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 September 15. Request your voucher.
Hi,
I am looking for the correct DAX so my measure brings out the total based on what the user has selected in slicers.
If > 1 Product A is selected then base measure on just Product A,
Else If > 1 Product B by Product B,
Else If > 1 Product C by Product C
Else Product D
TIA
Solved! Go to Solution.
@DW868990
The function you need to use for that is ISINSCOPE .
Check out this video (top right on the page) and doc:
https://dax.guide/isinscope/
@DW868990
The function you need to use for that is ISINSCOPE .
Check out this video (top right on the page) and doc:
https://dax.guide/isinscope/
@DW868990 , If slicer table is joined with table or slcier is part of the table then these should get filtered.
If those are not joined you can try treatas - https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
if you want based selection value
Switch(true() ,
selectedvalue(Table[Product]) = "Product 1" , [Measure1] ,
selectedvalue(Table[Product]) = "Product 2" , [Measure2] ,
selectedvalue(Table[Product]) = "Product 3" , [Measure3] ,
selectedvalue(Table[Product]) = "Product 4" , [Measure4] )
Check if you need field parameters
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
13 | |
8 | |
5 |