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.
We have events that are run every year. These events are in our Date Dimension as a text field, eg Mothers Day Lunch. The day/month is not the same every year. There are approx 50 events that are run annually.
In a power BI, if a user selects "Mothers Day Lunch" and Season 20/21, we would like to have a measure that shows comparative to prior 2 years.
How do we do this, as the field is not date format?
Solved! Go to Solution.
@Jachat , Try
=RANKX(all('Event Date'),'Event Date'[Racing Season],,asc,dense)
@Jachat , You need to have seprate date table, With Rank column suggested below on season/year. on on season/event ( "Mothers Day Lunch").
Event should part of date table to should be in a seperate table
New column
Rank on Season = rankx(all(Date), [Season], ,asc,dense)
measure
This Year = CALCULATE(sum('Table'[Value]), FILTER(ALL('Date'),'Date'[Rank on Season]=max('Date'[Rank on Season])))
Last Year = CALCULATE(sum('Table'[Value]), FILTER(ALL('Date'),'Date'[Rank on Season]=max('Date'[Rank on Season])-1))
I am trying to do this in SSAS tabular model
Does this look correct? As its giving me an error
=RANKX(all('Event Date','Event Date'[Racing Season],,asc,dense))
@Jachat , Try
=RANKX(all('Event Date'),'Event Date'[Racing Season],,asc,dense)
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 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |