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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JohnnyK
Advocate II
Advocate II

Column Totals over another, for percentage

Good day!

 

Simple raw data in 2 table as below.

 

NameWhole year target
Elijah54
Liam82
Noah70
Oliver68
William100

 

NameMonthMonth_number
LiamJan0
LiamFeb8
LiamMar0
NoahJan0
NoahFeb9
NoahMar9
OliverJan10
OliverFeb4
OliverMar3
WilliamJan10
WilliamFeb0
WilliamMar1
ElijahJan8
ElijahFeb7
ElijahMar7

 

 

I want to have a visual to show the month values per name, also the total numbers over the Target (in percentage), ideally like:

 

NameJanFebMarSub-TotalWhole year targetSub-Total over Target
Elijah877225441%
Liam08088210%
Noah099187026%
Oliver1043176825%
William10011110011%

 

With the settings, I can only come up with a matrix as below, and don't know what to do next.

 

Can you please help me? Thank you.

 

3355.png

 

1 ACCEPTED SOLUTION
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @JohnnyK ,

1)You will be required to make the relationship between two tables filtered in both directions

AvantikaThakur_0-1658305232951.png

2) And you would be required to create below measures -

(1) Jan = CALCULATE(sum('MOnthly values'[Month_number]),'MOnthly values'[Month]="Jan")

(2) Feb = CALCULATE(sum('MOnthly values'[Month_number]),'MOnthly values'[Month]="Feb")

(3) Mar = CALCULATE(sum('MOnthly values'[Month_number]),'MOnthly values'[Month]="Mar")

(4) SubTotal = CALCULATE(SUM('MOnthly values'[Month_number]),ALLEXCEPT('MOnthly values','MOnthly values'[Name]))

(5) Total target = CALCULATE(SUM('Target values'[Whole year target]))

(6) % = 'MOnthly values'[SubTotal]/'MOnthly values'[Total target]

 

3) And pull these measures along with Name column in the Table visual, it will give the below result 

AvantikaThakur_1-1658305392995.png

 

Hope this helps.

 

Please accept the solution if this answers your query.

Thanks!

Avantika

 

View solution in original post

2 REPLIES 2
JohnnyK
Advocate II
Advocate II

@Avantika-Thakur, brilliant! Thank you for your help!

Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @JohnnyK ,

1)You will be required to make the relationship between two tables filtered in both directions

AvantikaThakur_0-1658305232951.png

2) And you would be required to create below measures -

(1) Jan = CALCULATE(sum('MOnthly values'[Month_number]),'MOnthly values'[Month]="Jan")

(2) Feb = CALCULATE(sum('MOnthly values'[Month_number]),'MOnthly values'[Month]="Feb")

(3) Mar = CALCULATE(sum('MOnthly values'[Month_number]),'MOnthly values'[Month]="Mar")

(4) SubTotal = CALCULATE(SUM('MOnthly values'[Month_number]),ALLEXCEPT('MOnthly values','MOnthly values'[Name]))

(5) Total target = CALCULATE(SUM('Target values'[Whole year target]))

(6) % = 'MOnthly values'[SubTotal]/'MOnthly values'[Total target]

 

3) And pull these measures along with Name column in the Table visual, it will give the below result 

AvantikaThakur_1-1658305392995.png

 

Hope this helps.

 

Please accept the solution if this answers your query.

Thanks!

Avantika

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors