Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Everyone
I would like to combine Sign1 and Sign2 in one slicer, then based on selection from the slicer I would like to find the max date.
Sample table-
Result Expected-
Thanks in advance
Solved! Go to Solution.
You'll need to create a new table for the slicer. You can do this in the query editor or in DAX like this:
SignSlicer = DATATABLE ( "Sign", STRING, { { "P" }, { "Q" } } )
Once you have that, you can define the Max Date measure.
Max Date =
SWITCH (
SELECTEDVALUE ( SignSlicer[Sign] ),
"P", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign1] = "P" ),
"Q", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign2] = "Q" ),
MAX ( Table1[Dates] )
)
You'll need to create a new table for the slicer. You can do this in the query editor or in DAX like this:
SignSlicer = DATATABLE ( "Sign", STRING, { { "P" }, { "Q" } } )
Once you have that, you can define the Max Date measure.
Max Date =
SWITCH (
SELECTEDVALUE ( SignSlicer[Sign] ),
"P", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign1] = "P" ),
"Q", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign2] = "Q" ),
MAX ( Table1[Dates] )
)
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |