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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Akash18
Frequent Visitor

Issue related to DAX function when creating a new column in a selected table

Hi Mates,
When I am trying to use the DATEDIFF function in the new column in a selected table then I am getting a value of 44778.

Akash18_1-1659871870185.png

 


DAX Function in the column is:
Case3 = IF( 2021 <> 2022 && 2022 = 2022 ,DATEDIFF(Sheet1[STARTofYR],TODAY(),DAY), 0)
Quick Measures
[STARTofYR]  =  DATE(Sheet1[Selected Year],01,01)

[Selected Year] = SELECTEDVALUE(Calender[Date].[Year])


I am getting a value of 44778.

Akash18_2-1659872018949.png

Can someone help me with the problem?

Thank You for the help in advange. 

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Akash18 

Calling measure in a calculated column is not recommended.
Please convert 'Case3' into a new measure  and display its result in a card/table visual.

veasonfmsft_0-1661245637967.png

veasonfmsft_2-1661245978501.png

 

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @Akash18 

Calling measure in a calculated column is not recommended.
Please convert 'Case3' into a new measure  and display its result in a card/table visual.

veasonfmsft_0-1661245637967.png

veasonfmsft_2-1661245978501.png

 

Best Regards,
Community Support Team _ Eason

Akash18
Frequent Visitor

Yes.

Akash18_0-1659883615015.png

 

technolog
Super User
Super User

Hi!

Do you display values of this measures?

[STARTofYR]  =  DATE(Sheet1[Selected Year],01,01)

[Selected Year] = SELECTEDVALUE(Calender[Date].[Year])

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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