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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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