The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have two slicers(Week No & Region). when I select region individually values not getting reflected in Card(Visiual).
However am getting correct value when I select ALL in region(Slicer).
Dax Using:
Res1/Res2 =
SUMX(
Summarize('TS','TS'[Pri],'TS'[As]),
CALCULATE (
COUNTROWS('TS'),USERELATIONSHIP('TS'[DCS],'Calendar'[Date]),
FILTER (
ALL('TS'), 'TS'[Parent]=Blank() && 'TS'[InTa2] =1 &&
'TS' [Response/Restore]<>Blank()),
'TS'[Pri]=earlier('TS'[Pri]),
'TS'[As]=EARLIER('TS'[As]
)))+0
Regards,
Chandrashekar B
Solved! Go to Solution.
The function ALL is preventing for filters to be applied to the measure, so using VALUES instead of ALL would allow this to happen. It should look this way:
SUMX(
Summarize('TS','TS'[Pri],'TS'[As]),
CALCULATE (
COUNTROWS('TS'),USERELATIONSHIP('TS'[DCS],'Calendar'[Date]),
FILTER (
VALUES('TS'), 'TS'[Parent]=Blank() && 'TS'[InTa2] =1 &&
'TS' [Response/Restore]<>Blank()),
'TS'[Pri]=earlier('TS'[Pri]),
'TS'[As]=EARLIER('TS'[As]
)))+0
Hi there!
For what I can see, you are using ALL('TS') in your measure, is it possible that the Region field belongs to that table? If it does, then replacing ALL with another function like VALUES should fix the problem.
Let me know if that helps!
Hello,
Yes region belongs to table TS. Could you please help me with Dax as not understood how to replace ALL with values.
Regards,
Chandrashekar B
The function ALL is preventing for filters to be applied to the measure, so using VALUES instead of ALL would allow this to happen. It should look this way:
SUMX(
Summarize('TS','TS'[Pri],'TS'[As]),
CALCULATE (
COUNTROWS('TS'),USERELATIONSHIP('TS'[DCS],'Calendar'[Date]),
FILTER (
VALUES('TS'), 'TS'[Parent]=Blank() && 'TS'[InTa2] =1 &&
'TS' [Response/Restore]<>Blank()),
'TS'[Pri]=earlier('TS'[Pri]),
'TS'[As]=EARLIER('TS'[As]
)))+0
Hello,
Thanks it is working fine.
Regards,
Chandrashekar B
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |