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 All,
Appreciaet your help as I am trying to have one DAX measures which will calculate average or sum based on another column value. for headcount i need average for last two months and for sales and profit i need sum for last two months.
how can i have measure which will give em the values given in the Expected results columns.
Thanks in advance,
Solved! Go to Solution.
Hi,
I am not sure if I understood correctly your question, but please check the below picture and the attached pbix file.
Hi,
I am not sure if I understood correctly your question, but please check the below picture and the attached pbix file.
Hi @Jihwan_Kim Thanks this really helped where I have dates filter on the visual and I will accept as a solution.
What if (in another scenraio) I want to ignore the dates/date table reference in the Expected result measure and rather want to have an average values where metric is headcount and I want sum of Values where metric on the row is Sales and Profit? I want to get the values in the expected result column by using VAR in DAX. Please help, example is given below.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |