The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Team,
Good Day to you all!
I use a Matrix visual in my report with multiple Measures in the Values section, One dimension filed to Rows and Quarter filed to Columns.
Now the requirement is to limit the data to show for the last 5 quarters based on quarter selection.
Ex: if slicer is selected as Q1 2023, Matrix should show data from Q1 2022, Q2 2022, Q3 2022, Q4 2022 and Q1 2023
if else slicer is selected as Q2 2023, Matrix should show data from Q2 2022, Q3 2022, Q4 2022, Q1 2023 and Q2 2023.
Want to achieve this through Matrix visual only.
where as when i create measure like following
When above measure applied to fitlers section, this is how visual showing.
any help will be appriciate and thanks in advance
Regards,
Sairam
@dax @PowerBIDESKTOP
Solved! Go to Solution.
Hi, @SairamMVV
You can try the following methods.
Date table:
Measure:
Rank YQ = RANKX(ALL('Date'),CALCULATE(MAX('Date'[YQ No.]),ALLEXCEPT('Date','Date'[YQ No.])),,ASC,Dense)
Slicer table:
Slicer table = VALUES('Date'[YQ No.])
Measure:
Measure =
Var _rank1=CALCULATE([Rank YQ],FILTER(ALL('Date'),[YQ No.]=SELECTEDVALUE('Slicer table'[YQ No.])))
Var _rank2=_rank1-4
Return
IF(SELECTEDVALUE('Slicer table'[YQ No.])=BLANK(),1,IF([Rank YQ]>=_rank2&&[Rank YQ]<=_rank1,1,0))
Please refer to this method.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @SairamMVV
You can try the following methods.
Date table:
Measure:
Rank YQ = RANKX(ALL('Date'),CALCULATE(MAX('Date'[YQ No.]),ALLEXCEPT('Date','Date'[YQ No.])),,ASC,Dense)
Slicer table:
Slicer table = VALUES('Date'[YQ No.])
Measure:
Measure =
Var _rank1=CALCULATE([Rank YQ],FILTER(ALL('Date'),[YQ No.]=SELECTEDVALUE('Slicer table'[YQ No.])))
Var _rank2=_rank1-4
Return
IF(SELECTEDVALUE('Slicer table'[YQ No.])=BLANK(),1,IF([Rank YQ]>=_rank2&&[Rank YQ]<=_rank1,1,0))
Please refer to this method.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
18 | |
18 | |
17 | |
15 | |
11 |
User | Count |
---|---|
35 | |
34 | |
19 | |
19 | |
14 |