Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Fellow PBI users
I am trying to build a Table in my report page which contains a measure that sums up the sales of the previous day if the day today is Tuesday to Friday. The report will not run over the weekends but when the day today is Monday, I would want to sum up the sales from Friday to Sunday.
While there might be measures that can fulfill this, I am looking at how to make the Measure names change based on the day.
For example if today is tuesday, the Column name will display "15 Nov 2022" or "17 Nov 2022" if it is Thursday. But on Monday, it should display "Last 3 Days till 13 Nov 2022".
I am able to fulfill this requirement in Qlik but not sure how I can go about doing this in Power BI.
Appreciate any help on this. Thank you!!!
Regards,
Shao
@Anonymous , it Best to create a new column for that
Switch(True() ,
weekday([Date],2) = 6, "Last three days " & ([Date] +2 ),
weekday([Date],2) = 7, "Last three days " & ([Date] +1 ),
weekday([Date],2) = 1, "Last three days " & ([Date] )
)
Also refer
https://medium.com/@amitchandak/power-bi-show-weekend-data-on-monday-or-friday-dab5ee201f0e
Hi @amitchandak
Thanks for the tips and video. It has really been helpful!
For the column names, is it possible to input the formulas or anywhere to make it dynamic and changes accordingly to the day by itself?
Many thanks in advance!
Regards,
Shao