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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculations are not matching (Results compared between PBi and Excel)

I came across a problem where the results in Power Bi is not bein calculated correctly (my assumption). I copied the data to excel and created a Pivot Table, using the same filters that I applied to Power Bi. The Excel result is correct.

 

It's the same data for both Pbi and Excel. 

 

IMAGE 1 and IMAGE 3: It's a comparisson between the results in PBi and Excel (you can see the filters applied in the Pivot Table).

 

IMAGE 2: Shows the DAX formula I used.

 

Z CREATED Opportunities FILTERED = calculate(countrows('view_opportunities'),
FILTER('view_opportunities', 'view_opportunities'[is_active_text] == "true"),
FILTER('view_opportunities', 'view_opportunities'[is_won_text] == "false"),
FILTER('view_opportunities', 'view_opportunities'[is_closed_text] == "false"),
Filter('User_Roles', 'User_Roles'[Active] == "yes"),
Filter('User_Roles', 'User_Roles'[role] == "Sales - Generalist"),
userelationship('monthtable'[Month(Full)],'view_opportunities'[MONTH_Opp_Created]
))

 

Any ideas and Suggestions?

 

 

pb1.pngpbi2.pngpbi3.png

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous 

 

Measure will calculate depend on the context, if you dont add ALL() or ALLEXCEPT() to the filters table, it will calculate only the rows where Sale person = Adriano for the first rows in the matrix table visual.

And try measure like the following :

Z CREATED Opportunities FILTERED =
CALCULATE(
    COUNTROWS( 'view_opportunities' ),
    FILTER(
        ALL( 'view_opportunities' ),
        'view_opportunities'[is_active_text] == "true"
            && 'view_opportunities'[is_won_text] == "false"
            && 'view_opportunities'[is_closed_text] == "false"
    ),
    FILTER(
        ALL( 'User_Roles' ),
        'User_Roles'[Active] == "yes"
            && 'User_Roles'[role] == "Sales - Generalist"
    ),
    USERELATIONSHIP ( 'monthtable'[Month(Full)], 'view_opportunities'[MONTH_Opp_Created] )
)

 

Best Regards

Community Support Team _ chenwu zhu

 

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

PaulDBrown
Community Champion
Community Champion

Please share sample data (not an image) or PBIX file.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Nobody?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.