The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Having exhausted all my google skills and after reading multiple different similar scenarios and having no joy, I thought I'd ask myself!
I'd like to create a measure that will determine what the status of a row within my data is by the date. Here is a sample of the data:
I thought perhaps I could use a measure with a nested IF statement to determine the appropriate date column and then return the attached status but I couldn't get it to work. In essence I'd like to be able to say "as at today I have x U status, y C status etc for the period 2022/23, on this day last year I had a U status, b C status etc for the period 2021/22". Hopefully that makes sense!
@KellyM82 , Based on what I got.
Unpivot the date and status columns
Split the new column having date and status names ( and others will have values.)
than one column will have a number and one will have values date and status.
Pivot the date/status column and values column
Pivot Data(Power Query) :https://www.youtube.com/watch?v=oKByyI09Bno&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=12
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
Power Query Split Column , Split Column By Delimiter: https://youtu.be/FyO9Vmhcfag
Then you can use latest logic
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |