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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Tableau to DAX

Hi All,

 

I have this formula in Tableau

MC1M={FIXED [Oy Om],[SEQ]: IF SUM(IF [M C Survival Month Diff]<1 THEN 1 ELSE 0 END )>=1 THEN 1 ELSE 0 END}

OyOm=yearmonth

SEQ=1 to 60.

I wore the above in DAX as follows:

IF( CALCULATE(If(sum(Table1.[M C Survival Month Diff])<1,1,0),ALLEXCEPT(Table1,Table1[SEQ],Table[OY_OM]))>=1,1,0)
where
MC Survival Diff :
DATEDIFF((Table1[Date]),CALCULATE(MAX(Table1[Date]),ALLEXCEPT(Table1,Table1[SEQ])),MONTH)
Anything wrong with my DAX?
My calculation are not correct.
Regards,
Raj
 
1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a measure as follows:

Measure = IF( CALCULATE( COUNT('Table'[diff]),FILTER(ALL('Table'),[SEQ]=MAX([SEQ])&&[Oy Om]=MAX([Oy Om])&&[diff]=0))>=1,1,0)

Or

Measure 2 = IF(SUM([diff])<1,1,0)

The final output is shown below:

vyalanwumsft_0-1637287599431.png

If I misunderstand your logic, can you share the results you want to output and your logic according to the simple sample ? because I am not particularly familiar with Tabulea.Looking forward to your reply!


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a measure as follows:

Measure = IF( CALCULATE( COUNT('Table'[diff]),FILTER(ALL('Table'),[SEQ]=MAX([SEQ])&&[Oy Om]=MAX([Oy Om])&&[diff]=0))>=1,1,0)

Or

Measure 2 = IF(SUM([diff])<1,1,0)

The final output is shown below:

vyalanwumsft_0-1637287599431.png

If I misunderstand your logic, can you share the results you want to output and your logic according to the simple sample ? because I am not particularly familiar with Tabulea.Looking forward to your reply!


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , MC survival is measure then you do need a sum

 

a new measure like

If(sum(Table1.[M C Survival Month Diff]),ALLEXCEPT(Table1,Table1[SEQ],Table[OY_OM])<1,1,0)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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