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, I am looking to get the following output on the right. On the left is the original dataset. Bascially I am looking to filter my data to show the most 5 recent dates grouped by team name. Any help is appreciated!
Solved! Go to Solution.
Hi @jhubert41 ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below:
Flag =
VAR _selaway =
SELECTEDVALUE ( 'Table'[Away] )
VAR _rank =
RANKX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Away] = _selaway ),
CALCULATE ( MAX ( 'Table'[Date] ) ),
,
DESC,
DENSE
)
RETURN
IF ( _rank <= 5, 1, 0 )
2. Create a table visual and apply the visual-level filter with the condition(Flag is 1)
Best Regards
Hi,
Create a slicer of Away and select ANA. to your Table visual, drag Home and write these measures
Date value = sum(Data[Date])
Top 5 = calculate([Date value]),topn(5,all(Data[Home]),[Date value]),values(Data[Home]))
Drag the Top 5 measure to the visual.
Hi @jhubert41 ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below:
Flag =
VAR _selaway =
SELECTEDVALUE ( 'Table'[Away] )
VAR _rank =
RANKX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Away] = _selaway ),
CALCULATE ( MAX ( 'Table'[Date] ) ),
,
DESC,
DENSE
)
RETURN
IF ( _rank <= 5, 1, 0 )
2. Create a table visual and apply the visual-level filter with the condition(Flag is 1)
Best Regards
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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |