March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
UPDATE: I had to updae this post cuz my orginal was confusing.... Hope I've made it clearer....
Need help (again).....
I am using this slicer setup:
https://www.sqlbi.com/articles/filtering-and-comparing-different-time-periods-with-power-bi/
I'm trying to achive something like this:
my raw data looks something like this from(date from 2018 to 2020):
for example if my:
first range of dates was from 1/2/2018 to 1/5/2018
second range of dates from 5/8/2020 to 5/10/2020
Then, compare value from the prior set of data ( finding the max value) to the more current set of data finding the max value. I need to also show which date that Max day was.
I will get:
123 for 'g' on date 1/2/2018 vs 67678 for 'g' on 5/10/2020. (67678/123-1 to get YOY)
32425 for 'ng' on date 1/3/2018 vs 356 for 'ng' on 5/9/2020 (356/32425-1)
3456 for 'ing' on date 1/4/2018 vs 3456 for 'ing' on 5/8/2020 (3456/3456-1)
I hope i've made this clear....
Thanks all!
Mike
Solved! Go to Solution.
@mikelee1701
Not sure this will work with the YEAR listed in your Excel desired result screenshot, but following the same pattern as the formula in the blog link you posted, you can try to create this for max previous value:
MaxPrevious=
CALCULATE (
MAX(table[value]),
ALL ( 'Date' ),
USERELATIONSHIP ( 'Date'[Date], 'Previous Date'[Date] )
)
And this for the Max previous date:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@mikelee1701
Not sure this will work with the YEAR listed in your Excel desired result screenshot, but following the same pattern as the formula in the blog link you posted, you can try to create this for max previous value:
MaxPrevious=
CALCULATE (
MAX(table[value]),
ALL ( 'Date' ),
USERELATIONSHIP ( 'Date'[Date], 'Previous Date'[Date] )
)
And this for the Max previous date:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @AllisonKennedy ,
Thank you so much for your time.
The values are fine.
However for some reason I am only getting the last date of the filters:
I have plugged in my data into your pbix and I noticed that that the only diff was that my table's cal was actual calendar dates.
Why would this cause it to only show the last date?
this is my actual data (over two years of data):
Thank you,
Mike
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@mikelee1701 - I'm not following this entirely. Maybe Lookup Min/Max? https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
If not, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
hello everyone, something similar happens to me in PBI, I have the minimum and maximum value of the multimplos, but I need the minimum date of the minimum multiplo, not the minimum date of the fehcas, attached image to make it look better
Thanks Greg,
Your suggestions all over the forums have helped me with other problems I've had in the past.
Basically, I am using a slicer ( to filter) a range of dates, (call it previous period), and a range of dates ( call it current period). I want to compare ONLY the single MAX value from previous dates to the single Max value from the current range of dates.
On top of that, I want to know which date the max value occured on for both the previous period and the current period.
Regards,
Mike
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |