license:mit size_categories:n<1K format:csv modality:text library:datasets library:pandas library:mlcroissant library:polars region:us infinite-dataset-hub synthetic
---
license: mit
tags:
- infinite-dataset-hub
- synthetic
---

# DAXQueryLab

tags: Advanced, Power BI, DAX

_Note: This is an AI-generated dataset so its content may be inaccurate or false_

**Dataset Description:**

The 'DAXQueryLab' dataset comprises various examples of advanced Power BI DAX (Data Analysis Expressions) queries that showcase complex data manipulations, calculations, and visualizations. The dataset is intended for ML practitioners and Power BI users looking to explore advanced scenarios and techniques within the Power BI platform.

**CSV Content Preview:**

```
label,Query,Example,Complexity
DAXQueryLab_1,"Summarize Sales by Category with Cumulative Amount","
CALCULATE(
    SUM(FactSales[Amount]),
    ALL(DimDate[Date]),
    ALLEXCEPT(FactSales, FactSales[ProductKey]),
    FILTER(
        SUMMARIZE(FactSales, FactSales[CategoryKey], SUM(FactSales[Amount])),
        SUM(FactSales[Amount]) > 10000
    )
)","Advanced
DAXQueryLab_2,"Generate Monthly Sales Growth Chart","
CALCULATE(
    DIVIDE(
        CALCULATE(SUM(FactSales[Amount]), DATEADD(DimDate[Date], -1, MONTH)),
        SUM(FactSales[Amount])
    ),
    ALL(DimDate[Date]),
    FILTER(
        SUMMARIZE(FactSales, DimDate[Month], "MonthlySales", SUM(FactSales[Amount])),
        NOT(ISBLANK(DimDate[Month]))
    )
)","Advanced
DAXQueryLab_3,"Filter Products Based on Multiple Conditions","
FILTER(
    VALUES(FactProducts[ProductName]),
    FactProducts[QuantityInStock] > 0 &&
    FactProducts[Discontinued] = FALSE &&
    FactProducts[CategoryKey] IN {1, 2, 3}
)","Advanced
DAXQueryLab_4,"Calculate Year-Over-Year Growth for Products","
CALCULATE(
    (SUM(FactSales[Amount]) - TOTALYTD(0, FactSales[Amount])) / TOTALYTD(0, FactSales[Amount]),
    ALL(FactSales[Date]),
    FILTER(
        VALUES(FactProducts[ProductName]),
        FactProducts[CategoryKey] IN {1, 2, 3}
    )
)","Advanced
DAXQueryLab_5,"Combine Data from Multiple Tables with Crossfiltering","
CROSSJOIN(
    VALUES(DimCustomer[CustomerName]),
    VALUES(DimProduct[ProductName]),
    FILTER(
        VALUES(DimProduct[ProductCategory]),
        DimProduct[ProductCategory] = "Electronics"
    )
)","Advanced"
```

**Source of the data:**

The dataset was generated using the [Infinite Dataset Hub](https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub) and microsoft/Phi-3-mini-4k-instruct using the query 'Power BI DAX Queries Advanced examples':

- **Dataset Generation Page**: https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub?q=Power+BI+DAX+Queries+Advanced+examples&dataset=DAXQueryLab&tags=Advanced,+Power+BI,+DAX
- **Model**: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct
- **More Datasets**: https://huggingface.co/datasets?other=infinite-dataset-hub
