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

Calculation based on data grouping

Hi All,

 

I have a Fact table (left) and Dim table (right). Below is a table visual I want to show in the dashboard. 

For row Brand A, I want to show the percentage where the Denominator is 10 (actual) and Numerator is 3 (sales).

 

Brand A % = 10/3

Brand B % = 20/6 

 

Is it possible to achieve this? Can anyone show me the method?

 

 

beekee_0-1604001681676.jpeg

 

 

Thanks & Regards,

BK

1 REPLY 1
DataInsights
Super User
Super User

@beekee,

Try this:

1. Add the Group column to the Mark table.

DataInsights_0-1604266642149.png

2. Create a relationship between the Sales and Brand tables.

DataInsights_1-1604266655441.png

3. Create measure.

Market = 
VAR vNumerator =
    SUM ( Sales[Actual] )
VAR vDenominator =
    SUM ( Sales[Sales] )
VAR vResult =
    DIVIDE ( vNumerator, vDenominator )
RETURN
    vResult

4. Create a visual table, using the Mark column of the Mark table.

DataInsights_2-1604266673500.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.