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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
sreddy47652
Helper III
Helper III

Need help to convert tableau expression to DAX

Hi I need to convert below tableau expression to Dax. (ZN(SUM([QTY Order-REQ-Fcst Selected Cycle])) - LOOKUP(ZN(SUM([QTY Order-REQ-Fcst Selected Cycle])), -1)) / ABS(LOOKUP(ZN(SUM([QTY Order-REQ-Fcst Selected Cycle])), -1))

4 REPLIES 4
Anonymous
Not applicable

Hi @sreddy47652 ,

Is there any progress on this issue?

 

If you find any answer is helpful to you, please remember to accept it.

 

It will help others who meet the similar question in this forum.

 

Thank you for your understanding.

Anonymous
Not applicable

Hi @sreddy47652 , dharmendars007, thank you for your prompt reply!

 

Based on your expression, try the measure as following:

 

 

VAR CurrentValue = COALESCE(SUM([QTY Order-REQ-Fcst Selected Cycle]), 0)
VAR PreviousValue = CALCULATE(
   COALESCE(SUM([QTY Order-REQ-Fcst Selected Cycle]), 0),
   PREVIOUSMONTH('Date'[Date]) 
)
RETURN
IF(
   PreviousValue <> 0,  
   (CurrentValue - PreviousValue) / ABS(PreviousValue),
   BLANK() 
)

 

 

Best regards,

Joyce

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

dharmendars007
Super User
Super User

Hello @sreddy47652 

 

We need more context on the above formula like what exactly is the result expected , by the way formula look it looks like percent change comapred to last month, so you can try the below formula if this doesnt work, please give us more information..

 

Percentage Change =
VAR CurrentValue = SUM('YourTable'[QTY Order-REQ-Fcst Selected Cycle])
VAR PreviousValue =
CALCULATE(
SUM('YourTable'[QTY Order-REQ-Fcst Selected Cycle]),
DATEADD('YourDateTable'[Date], -1, MONTH) // Change MONTH to DAY, YEAR, etc., depending on your requirement
)
RETURN
DIVIDE(
(CurrentValue - PreviousValue),
ABS(PreviousValue),
0
)

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

It's throwing an error like  " A table expression containing more than one column specified in the call to function "DATEADD" is not supported.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors