cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Weekday as DAX measure and not as calculated column

Hi,

I have a fact table and a calendar table with date. I need to show weekday name (for e.g. 1st Jan is Monday) as DAX measure in pivot table and not a calculated column in calendar table.

I have tried using FORMAT function, its working fine when i use it in calendar table but i need weekday as measure because i have already put "Date" in rows in pivot table.

 

Please help.

Regards

Harish Rathore

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Weekday as DAX measure and not as calculated column

 

DayNameMeasure = IF ( HASONEVALUE ( DateTable[DayName] ), VALUES ( DateTable[DayName] ) )

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs

Cheers 

SU18_powerbi_badge

 

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Weekday as DAX measure and not as calculated column

Hi @HarishRathore25 

If you already have DateTable[Date] in your "pivot table" you can just use:

DayNameMeasure= SELECTEDVALUE( DateTable[DayName] )

where DayName is the name of the column in your DateTable that has the name of the day.

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs

Cheers 

SU18_powerbi_badge

 

Highlighted
Frequent Visitor

Re: Weekday as DAX measure and not as calculated column

Hi @AlB , thanks for your quick response. But i would like to inform you that i do not get any function called "SELECTEDVALUE" in my office 365 version. I am working on powerpivot model in excel. Any other method which can resolve my issue?

 

Regards

Harish

Highlighted
Super User III
Super User III

Re: Weekday as DAX measure and not as calculated column

 

DayNameMeasure = IF ( HASONEVALUE ( DateTable[DayName] ), VALUES ( DateTable[DayName] ) )

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs

Cheers 

SU18_powerbi_badge

 

View solution in original post

Highlighted
Frequent Visitor

Re: Weekday as DAX measure and not as calculated column

Thanks a ton @AlB ..... that worked like a charm.

 

Regards

Harish Rathore

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors