Previous -N- Months or Future - N- Months with SELECTED Measures in Power BI |
Вставка
- Опубліковано 5 вер 2024
- Many Times we get questions about showing last 6 months or 12 months, or even how to show future N months. So this Video is the answer for all such questions
Get Help into Questions Related to #powerbi, #dax, #powerquery Power BI #datamodeling, #analysisservices and #powerbiservice and #microsoftfabric
Check out our website www.powerbihelpline.com and blog-post. for end-to-end power BI solutions, Power BI templates, or any kind of Power BI questions like Power query errors, Authoring and optimizing DAX codes for complex business logic.
Follow us on LinkedIn
/ power-bi-helpline-22a2...
Email- info@pbihelpline.com
@PowerBIHelpline
I was trying to create a similar logic but it did not work, compared to you I did it a filter for the past one year, like if I select this year from a slicer, it was supposed to show previous year :
New OPEN requisition =
VAR _fromdate=
IF (
Selectedvalue('Past/Future'[Past or Future])="Past", MAX(NEWDATET[Year]), Min(NEWDATET[Year])
)
VAR _pastfuturemonthshift=
SELECTEDVALUE('Past/Future'[Multiplier])*MAX('No. of year'[No. of year])
VAR _periodshift=
DATESINPERIOD(NEWDATET[Year], _fromdate,_pastfuturemonthshift, YEAR)
Return
Calculate(
[Open Requisition],
REMOVEFILTERS(LU_Calendar),
KEEPFILTERS(_periodshift),
USERELATIONSHIP(LU_Calendar[DateValue_DATE], NEWDATET[DateValue_DATE])
)
Thank you very much for your wonderful video, I tried but I am unable to do as you did. first selection from dim date table, secondly I am selecting past /future from slicer, thirdly I am entering frequency and last in the clustered column chart I have changed the x axis from dim date to new date but its only reflecting the selected period from dim date table not moving to past or future. pls guide me
Thank you
To get the PBIX file used in the demo, You can send an email by mentioning video title as email subject
It's really awesome tricks! I'm definitely going to try it. I'm surprised to see that all such insights is possible in one visual. You did great indeed.
Glad to know it is so useful . Thanks for watching.
Excellent! Thank you!
You are welcome!
Excellent! and it worked :)
Glad it helped! Thanks for watching.
Sir, Thanks for the Video. I have week column with 1,2,3,4,5 etc for 11 weeks. I want to display last 4 weeks in Matrix chart like Week 11, week 10, week 9, week 8 showing the sales for individual weeks dynamically.. Shall I follow the same approach as per the video? Please assist.
Yes, you can.
@@PowerBIHelpline Thanks for the reply.
Waoooo
Glad it was helpful!
What will be the approach if I want to add another button with All Months ? or history time ?
I have posted another video for custom slicer for historical time. like last 7 days, last 30 days along with "All" this "All" will enable again a date slider to select a date range. please check it out.
Thank you very much my project is in the future, next 6 months to provide all data between now and +6 months, I will check your video, any advices are welcome.
This is amazing, gonna try this❤
My past is working fine but my future is pulling up everything on my rolling calendar how do I fix this problem
This solution shows for both past and future. please review and match your codes with the solution video
If Year month is not selected in slicer then by default last 12 months of the calendar should be displayed in column chart, how can we achieve by using this dax?
You can store the default in a variable, and inside your return statement, validate using ISFILTERED() on the year month column.
No of month column not supporting text value to integer. Error in visual . please help to solve this issue
Please check datatype of the month column
❤
Thanks for watching.
@@PowerBIHelpline I keep getting a blank when I switch to my chart to the new date table and new sales measure
Can you please bring visual element on how the DAX formula evaluated under-the-hood, so we can see it visually like this one ua-cam.com/users/shortsJCGoZe24CXc?feature=share. I kinda lost when you verbally explain the measure. This way you can keep advanced and novice users on the same page. I think this is gonna make a huge difference. Thanks
Thank you so much for the amazing feedback.