Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
Following table,
I have 2 calculated measures, one is No of Required Person another one is No of Employees selected.
No of Employees selected measure is not showing the total value correctly. if I click the date filter as any value not showing the total value also
Sample Pbix File:
Solved! Go to Solution.
Hi,
This is not my Expected Output.
No of Employees Selected =
Hi @Anonymous ,
Based on my test, the two methods as @Anonymous offered above work fine.
If you stick to your own formula, you can change it like DAX below.
No of Employee Selected = var d= CALCULATE(COUNT(Sheet2[Employee ID ]),FILTER(ALLSELECTED(sheet2),Sheet2[Department]=MAX(Sheet1[Department ID]))) VAR _table = SUMMARIZE(Sheet1, Sheet1[Department ID],"_Value",d) RETURN IF(HASONEVALUE(Sheet1[Department ID]),d,SUMX(_table,[_Value]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Is your expected result will be
1
2
1
1
---
5 - Total
If yes, then there are 2 ways to achieve this
1) Change the measure as below
Hi @Anonymous
Hi,
This is not my Expected Output.
No of Employees Selected =
Hi @Anonymous ,
Based on my test, the two methods as @Anonymous offered above work fine.
If you stick to your own formula, you can change it like DAX below.
No of Employee Selected = var d= CALCULATE(COUNT(Sheet2[Employee ID ]),FILTER(ALLSELECTED(sheet2),Sheet2[Department]=MAX(Sheet1[Department ID]))) VAR _table = SUMMARIZE(Sheet1, Sheet1[Department ID],"_Value",d) RETURN IF(HASONEVALUE(Sheet1[Department ID]),d,SUMX(_table,[_Value]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much Amy
Hi Amy,
i used the measure which you sent.
if i click the 05-may-2019 date filter its not working.
Pbix sample file:
if i click the 05-Jun-2019 Date filter its working
Hi @Anonymous ,
You can change the Cross filter direction from Single to Both, which will treat the these tables as a single table .
Best regards
Amy Cai
Amy,
I need cross filter direction as single (No of Required Person Measure).
is there is any chance to write a dax code for cross filter as both in a dax query?
Thanks in Advance,
Yuvaraj
Amy,
I alter the dax query,
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |