Forum Discussion
Tableau to Dax Question
Hello Team,
I am trying to figure out this calculation from tableau, any help would be much appreciated.
If [Fiscal Year]=([Report as of FY]-1) and INT([Fiscal Period])<= INT([Report as of Fiscal Period])
then [Sales Revenue in USD (M)] ELSE 0 END
- Anonymous2 years ago
Hi g-wizard
Please try this:
IF ( [Fiscal Year] = [Report as of FY] - 1 && INT[Fiscal Period] <= INT[Report as of Fiscal Period],//logicaltext [Sales Revenue in USD (M)]//result if true )Here is the link of If function:
IF function (DAX) - DAX | Microsoft Learn
Dax Overview:
DAX overview - DAX | Microsoft Learn
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- lbendlinSuper User
IF(some comparison,result if true,[result if false)
- gdwoodsNew Member
in DAX:
Sales Revenue in USD (M) = IF ( [Fiscal Year] = [Report as of FY] - 1 && INT([Fiscal Period]) <= INT([Report as of Fiscal Period]), [Sales Revenue in USD (M)], 0 ) - AnonymousNot applicable
Hi g-wizard
Please try this:
IF ( [Fiscal Year] = [Report as of FY] - 1 && INT[Fiscal Period] <= INT[Report as of Fiscal Period],//logicaltext [Sales Revenue in USD (M)]//result if true )Here is the link of If function:
IF function (DAX) - DAX | Microsoft Learn
Dax Overview:
DAX overview - DAX | Microsoft Learn
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.