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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
vswar
Frequent Visitor

Having difficulty converting Tableau measure to PowerBI Dax.

Hi,

I am in the process of converting few Tableau dashboards into Power BI but having difficulty figuring out this formula.  Can someone point me to right direction. 
 
Bounce Rate Formula : 
SUM({ FIXED [Matmovisit ID] : 
    SUM(
              IF { INCLUDE [Matmovisit ID] : SUM([interactions]) } = 1
                    THEN 1
              ELSE 0
              END
           )}
    ) / COUNT([Matmovisit ID])
 
Thanks in advance!
 
1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @vswar ,

 

To convert your Tableau Bounce Rate formula into Power BI, you can use a DAX approach to replicate the functionality of Tableau's FIXED and INCLUDE functions. Here’s how to structure the formula:

 

To replicate { INCLUDE [Matmovisit ID] : SUM([interactions]) } = 1, you’ll need to calculate interactions per Matmovisit ID and flag those with only one interaction.

 

InteractionsPerVisit = 
    CALCULATE(
        SUM('Table'[Interactions]),
        ALLEXCEPT('Table', 'Table'[Matmovisit ID])
    )
BounceFlag = 
    IF([InteractionsPerVisit] = 1, 1, 0)

 

 

Then, sum up the visits with only one interaction across all Matmovisit ID values.

 

TotalBounces = 
    CALCULATE(
        SUMX(
            VALUES('Table'[Matmovisit ID]),
            IF([InteractionsPerVisit] = 1, 1, 0)
        )
    )

 

Now that you have the count of bounces, you can divide by the total number of visits to get the bounce rate.

 

BounceRate = 
    DIVIDE(
        [TotalBounces],
        COUNT('Table'[Matmovisit ID]),
        0
    )

 

In summary:

  • InteractionsPerVisit calculates the total interactions per Matmovisit ID.
  • BounceFlag flags a visit as a bounce if interactions equal 1.
  • TotalBounces calculates the total bounces across all visits.
  • BounceRate divides total bounces by the total number of visits to get the bounce rate.

This should give you a similar outcome to your Tableau formula.

 

Best regards,

View solution in original post

3 REPLIES 3
DataNinja777
Super User
Super User

Hi @vswar ,

 

To convert your Tableau Bounce Rate formula into Power BI, you can use a DAX approach to replicate the functionality of Tableau's FIXED and INCLUDE functions. Here’s how to structure the formula:

 

To replicate { INCLUDE [Matmovisit ID] : SUM([interactions]) } = 1, you’ll need to calculate interactions per Matmovisit ID and flag those with only one interaction.

 

InteractionsPerVisit = 
    CALCULATE(
        SUM('Table'[Interactions]),
        ALLEXCEPT('Table', 'Table'[Matmovisit ID])
    )
BounceFlag = 
    IF([InteractionsPerVisit] = 1, 1, 0)

 

 

Then, sum up the visits with only one interaction across all Matmovisit ID values.

 

TotalBounces = 
    CALCULATE(
        SUMX(
            VALUES('Table'[Matmovisit ID]),
            IF([InteractionsPerVisit] = 1, 1, 0)
        )
    )

 

Now that you have the count of bounces, you can divide by the total number of visits to get the bounce rate.

 

BounceRate = 
    DIVIDE(
        [TotalBounces],
        COUNT('Table'[Matmovisit ID]),
        0
    )

 

In summary:

  • InteractionsPerVisit calculates the total interactions per Matmovisit ID.
  • BounceFlag flags a visit as a bounce if interactions equal 1.
  • TotalBounces calculates the total bounces across all visits.
  • BounceRate divides total bounces by the total number of visits to get the bounce rate.

This should give you a similar outcome to your Tableau formula.

 

Best regards,

Thanks you so much for this. Your DAX functions are calculating the data precisely. 

Ritaf1983
Super User
Super User

Hi @vswar 

Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.  

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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