How to Compare Different Time Periods or Date Ranges in Power BI or SSAS
Vložit
- čas přidán 31. 07. 2024
- In this video, we are going to see an effective way to compare or filter different time periods or date ranges. It is a useful technique to compare the value of a measure in different time periods.
We will use CALCULATE, USERELATIONSHIP and REMOVEFILTERS dax functions.
Watch our other video on time intelligence in Power BI:
• How to Compare Two Tim...
Watch our introductory video on Power BI:
• Create Your FIRST Powe...
You've saved me! This is by far the best video, you make me cry for happiness. Thank you, thank you!
Thank you for your kind message. Really happy you liked it :)
Very well done. I was looking for this. I also wanted to show the difference and percent change. This is a good start
Thanks for your comment, happy you liked it :)
This is exactly what I was looking for. Thanks!
Happy it was helpful :)
I love you ❤❤❤ Im looking for that since days. And you explain it soooo clear and smooth - THANK YOUUUU 🙏🏽🙏🏽🙏🏽
Haha, thank you. Happy you liked it. Don't hesitate to watch other videos of the channel :)
@@BILand I will :) All of them
Hello! Thank you for the super cool video.
One question: if you wanna display that in a bar chart with month in the X axis, how would you do it? I have a report similar to yours and used the corrispondent month field in "calendar" table. For the comparison value however doesnt react to that and displays same value in all the month columns...
Very well explained. This is really helpful! Thank you so much :)
Thank you for your feedback. Happy it was helpful :)
Thanks to share!!!. I'll include this in one of mi report, good idea.
Great! You're welcome
Nice work. Really helpful. 👍
Happy it was helpful for you. Thanks for watching.
Hi, Thank u for the great video. I have one doubt, I have created a live dash board that compares the values in two periods. Is there a way to show the default selected dates as last 30 days in both the slicer?
Hi, yes it's possible. For example you can create a calculated column and flag the lines for the last 30 days, then use a measure filter. I think the following videos can help you out with a bit of work around. The first one is measure filters. The second one also can be helpful, a bit different context but the idea is kind of the same... :)
czcams.com/video/Ss5L7jXIhso/video.html
czcams.com/video/E_-NsH1o308/video.html
how to put "month" in rows for both measures? they are stored in both calendars. thx for video
Hey there, one way is to create a month (if more than one year, then year-month) column in the fact table and put this column in the visual.
@@BILand yep, ty, that's how i solved it too. But it works with single fact table only. For one diagram i have to create another table 😄 with months and link it to both fact tables.
What if I want to show the nb cases for two different years in the visual and then show the difference. So when someone see the report they also want to know what cases were there in 2019 and 2017 rather than seeing only dates data !! Is there any possibility to show the data for both years and the comparison. It would be better if I can show these three as seperate visuals
Yes, you can do percentage change calculation and bring it to the visual. Here you can see how it is done :)
czcams.com/video/knXFVf2ipro/video.html
Hello, thank you for this video. Is it possible to show the selected dates in the column headers ?
Hi, there isn't really an efficient way to do it. Right now dynamic headers are not really possible. A proxy possible would be via calculated table for matrices where you can put slicer value in columns of matrix and each time you select new value in slicer the column in matrix changes (header and values). A solution would also be placing slicer value in a card just on top of your your columns if column width doesn't change. Hope this is helpful
Thank you very much! Do you have any resource showing how to implement the first solution? @@BILand
If i have to compare the data only for all January's across all years and all february's across all years and so on, which video should i refer to?
Hi there, check this out :
czcams.com/video/knXFVf2ipro/video.html
You'll need a little bit of work around. You can have month and year columns, years in slicer and months in the chart
Super clear, thank you for the advice. Maybe you could have skipped the theming at the end :)
Thanks for your comment, I appreciate it. Happy it was helpful :)
Hi there, I have a doubt. If I want to compare many graphs, Do I have to create one calendar for each?
No, comparing is for two periods and therefore two calendars, all of the graphs can be filtered (or not according to the need) with them
@@BILand Okay, thanks. And I always have to use the function count? Because I need to compare with the sum of the column. Is that possible?
SAVER in 2024
Thanks bro