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
I am trying to get a table with Min and Max Years upon selecting two or more years from a date(Year) slicer.
I need help to get it working.
https://drive.google.com/file/d/1Haf8FMIICZOAiE839trkJgdJN1ZFLKrx/view?usp=sharing
I have this Table measure:
Thank you
Tamir
Actually, the following file expresses better the requirement.
https://drive.google.com/file/d/1sBYqwxXJrXE6fXhngeL_fglpzXFEJ8zP/view?usp=sharing
I didn't manage to force MIN Year and MAX year in the VARs.
I am using these values to show in the Calculated table.
Thank you,
Tamir
@tamiribas
Please check the attached file, I created a measure and assigned at the visual filter on the Filter pane. I think you do not have to create a separate table here. Please check
Min or Max =
VAR __MinYear =
CALCULATE(
MIN(dimDate[Year]),
ALLSELECTED( dimDate[Year] )
)
VAR __MaxYear =
CALCULATE(
MAX(dimDate[Year]),
ALLSELECTED( dimDate[Year] )
)
VAR __Result =
INT ( SELECTEDVALUE( dimDate[Year] ) in {__MinYear,__MaxYear} )
RETURN
__Result
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi
It's very interesting! I would be happy to see the answer, I also met with a similar task
Hi @tamiribas
You can add a year column to the new table that you created :
Create a flag measure
Result :
PBIX is attached
If this post helps, then please consider Accepting 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 |
---|---|
95 | |
94 | |
79 | |
71 | |
64 |
User | Count |
---|---|
120 | |
105 | |
99 | |
81 | |
72 |