Forum Discussion
How To Show Last 4 weeks Trend In Column Bar chart in Power bi Desktop Using a DAX measure
- 1 year ago
This is the result I have now
File is here
https://drive.google.com/drive/folders/1_93F5-o1DgYzAPefuwJehUHLKaxdpp5u?usp=sharing
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Do you mean you always want to see the last 4 weeks in the bar chart?
If yes, based on what do you consider a week to be the last one (week of today, week of the most recent fact...)?
My solution would be to create a calculated column in the calendar, showing a "Y" if the date is in the last 4 weeks and a "N" otherwise
Yu can then use that column to filter the values in the X line (or Y line, depend if you have an horizontal or vertical bar chart)
Is this what you want? If yes, please specify how to identify the last week and I shall provide the code
If this helped, please consider giving kudos and mark as a solution
mein replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- Koritala1 year ago
Post Patron
Hi FBergamaschi,
reviewMy requirement is based on the current week, previous 4 weeks I want to show on x axis of the bar chart.Could you please share the pbxi file with your code to understand?Thanks,Sri.eek of today
- FBergamaschi1 year ago
Super User
This is the result I have now
File is here
https://drive.google.com/drive/folders/1_93F5-o1DgYzAPefuwJehUHLKaxdpp5u?usp=sharing
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI