Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
{ 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!
Solved! Go to Solution.
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
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