Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Conditional display of column names in visuals

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

2 REPLIES 2
amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors