Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have the below table data. Price amount is stored based on Year-Month and Type (Actual/Budget).
Year- Month field is having a relationship with Data Table. There are date, month and year slicers available in Power BI from Data Table.
| Year - Month | Type | Price |
| 2022 - 01 | Actual | 450 |
| 2022 - 01 | Budget | 500 |
| 2022 - 02 | Actual | 300 |
| 2022 - 02 | Budget | 250 |
| 2022 - 03 | Budget | 400 |
| 2022 - 04 | Budget | 500 |
| 2022 - 05 | Budget | 600 |
| 2022 - 06 | Budget | 200 |
| 2022 - 07 | Budget | 300 |
I need to create two measures "Actual Price" (Type = Actual) and "Budget Price" (Type = Budget).
These two measures should change only based on the Date filters and any other filters should not affect these values at any case.
If multiple year and months are selected then meaures should show the average value since multiple prices will be as result.
Please help with DAX.
Solved! Go to Solution.
@sabariprabu ,These measures should help
Actual= AverageX(Values(Table[Month Year]) , Calculate(Sum(Table[price]), filter(Table, Table[Type] = "Actual")) )
Budget= AverageX(Values(Table[Month Year]) , Calculate(Sum(Table[price]), filter(Table, Table[Type] = "Budget")) )
@sabariprabu ,These measures should help
Actual= AverageX(Values(Table[Month Year]) , Calculate(Sum(Table[price]), filter(Table, Table[Type] = "Actual")) )
Budget= AverageX(Values(Table[Month Year]) , Calculate(Sum(Table[price]), filter(Table, Table[Type] = "Budget")) )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |