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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Evaluating the VALUE of the Variable in DAX

Hi, can someone please explain me how to check the value returned by a variable in DAX ?

I am using below dax to create a measure for my power bi report and i want to check what value the below variable is
returning ? how do i do it in powerbi ? I dont have DAX Studio.

measure =
var _diff = datediff(minx('Date', startofyear('Date'[Date], "3/31")), today(), Week)
return
divide([measure2],_diff)


Many Thanks

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@Anonymous 

To check the result of the variable, just add it after the "return" function:

Check variable =
var _diff = datediff(minx('Date', startofyear('Date'[Date], "3/31")), today(), Week)
return
_diff





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
vanessafvg
Super User
Super User

what do you want to check it for?   





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




PaulDBrown
Community Champion
Community Champion

@Anonymous 

To check the result of the variable, just add it after the "return" function:

Check variable =
var _diff = datediff(minx('Date', startofyear('Date'[Date], "3/31")), today(), Week)
return
_diff





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.