The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Solved! Go to Solution.
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:
This should give you a similar outcome to your Tableau formula.
Best regards,
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:
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.
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.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
30 |
User | Count |
---|---|
181 | |
88 | |
71 | |
48 | |
46 |