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.
Hi All,
I have a table that contains comments being added to it based on the monthload.
Want to write a measure that can ouput the comment using filter conditions included in the DAX rather than filters.
Ex: Something like -
var yr = selectedvalue(T2(year))
var ml = selectedvalue(T2(monthload))
Return
Calculate(Comments, Year=yr,Monthload=ml)
Here the year and Monthload will be selected from a dimension table so want the measure to slice the data in fact table using the year & monthload values provided from Dimension table. @tamerj1
Solved! Go to Solution.
Hi @nareshr89 ,
You can create a measure as below.
Filter =
VAR _YR =
SELECTEDVALUE ( 'Calendar'[Year] )
VAR _ML =
SELECTEDVALUE ( 'Calendar'[Monthload] )
RETURN
IF ( MAX ( 'Table'[Year] ) = _YR && MAX ( 'Table'[MonthLoad] ) = _ML, 1, 0 )
Add this measure into visual level filter and set it to show items when value = 1.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @nareshr89 ,
You can create a measure as below.
Filter =
VAR _YR =
SELECTEDVALUE ( 'Calendar'[Year] )
VAR _ML =
SELECTEDVALUE ( 'Calendar'[Monthload] )
RETURN
IF ( MAX ( 'Table'[Year] ) = _YR && MAX ( 'Table'[MonthLoad] ) = _ML, 1, 0 )
Add this measure into visual level filter and set it to show items when value = 1.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |