Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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] )
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
19 | |
19 | |
15 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |