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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
g-wizard
Frequent Visitor

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

1 ACCEPTED SOLUTION
v-zhengdxu-msft
Community Support
Community Support

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.

View solution in original post

3 REPLIES 3
v-zhengdxu-msft
Community Support
Community Support

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.

gdwoods
New 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 )

lbendlin
Super User
Super User

IF(some comparison,result if true,[result if false)

IF function (DAX) - DAX | Microsoft Learn

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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