Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |