Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello guys
I need a little help regarding calculated measure. I have created calculated measure suing DAX SUMX function.
I need to calculate top 10 employee by expense as a single measure. please see attached screen shot and help me whats wronge with my DAX expression. I am not getting any error either.
Solved! Go to Solution.
Hi @Nomi5007,
Based on my test, you could refer to below formula:
Measure2 = var temptable=TOPN(10,ALLSELECTED(Sheet1),CALCULATE(SUM('Report 1'[$ Amount]),USERELATIONSHIP(Sheet1[Worker ID],'Report 1'[worker ID]))) return SUMX(temptable,CALCULATE(SUM('Report 1'[$ Amount]),USERELATIONSHIP(Sheet1[Worker ID],'Report 1'[worker ID])))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @Nomi5007,
Could you have checked if there is other filter for your data? Could you have tried use ALL() function in your formula? If it stlii could not work for you, could you please offer your sample data to have a test if possible?
Regards,
Daniel He
Yes I have changed the expression like this
Hi @Nomi5007,
Based on my test, you could refer to below formula:
Measure2 = var temptable=TOPN(10,ALLSELECTED(Sheet1),CALCULATE(SUM('Report 1'[$ Amount]),USERELATIONSHIP(Sheet1[Worker ID],'Report 1'[worker ID]))) return SUMX(temptable,CALCULATE(SUM('Report 1'[$ Amount]),USERELATIONSHIP(Sheet1[Worker ID],'Report 1'[worker ID])))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Thank you it works
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |