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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Tableau to DAX

{ FIXED [ALANA] :COUNTD(IF [Resident - Show/Hide] THEN [Student Id] END)} + { FIXED [ALANA] :COUNTD(IF [Resident - Show/Hide] = FALSE THEN [Student Id] END)}

 

 

IF [Compute By] = '1' THEN COUNTD([Student Id]) ELSE NULL END

 

 

CASE [Compute By]

WHEN '1' THEN [% Across]

WHEN '2' THEN [% Down]

END

 

 

Please help me convert above Tableau calculated fields in DAX.

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Are these three formulas?

There's no countd() function in dax, you may consider to use distinctcount().

IF() function in DAX is like below:

IF( [Compute By] = '1' , DISTINCTCOUNT([Student Id]) , blank())

 

Switch() function:

Swtich([Compute By],
      '1' , [% Across]
      '2' , [% Down]
)

 

I'm not good at Tableau, please consider to share some sample data and expected result if you need further help.

 

Best Regards,

Jay

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Are these three formulas?

There's no countd() function in dax, you may consider to use distinctcount().

IF() function in DAX is like below:

IF( [Compute By] = '1' , DISTINCTCOUNT([Student Id]) , blank())

 

Switch() function:

Swtich([Compute By],
      '1' , [% Across]
      '2' , [% Down]
)

 

I'm not good at Tableau, please consider to share some sample data and expected result if you need further help.

 

Best Regards,

Jay

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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors