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
sinanalmac
Resolver I
Resolver I

how to merge different calculates in one clustered column chart

Hi  ,
I have a table 

YearOrganizationCategoryABA/B
2017ORG03DES947.139.9901.012.789.9900,94
2018ORG03DES1.032.033.3401.123.163.3400,92
2017ORG03DRES22.583.395.15023.415.332.1700,96
2018ORG03DRES19.020.697.50019.676.907.5000,97
2017ORG01FO71.992.082.11078.812.484.8700,91
2018ORG01FO61.018.822.63069.095.907.8800,88
2018ORG03FO5.320.0005.380.0000,99
2017ORG01AC143.056.467.959155.319.215.8000,92
2018ORG01AC128.905.806.910141.928.239.1000,91
2017ORG04IC466.541.114.830466.958.939.8301,00
2018ORG04IC453.199.936.300453.345.342.9701,00
2017ORG01DC67.099.256.75078.393.077.3600,86
2018ORG01DC60.848.380.88071.946.366.9100,85
2017ORG03SAV6.418.922.5206.824.522.5200,94
2018ORG03SAV6.529.833.3306.868.713.3300,95
2017ORG03SCC3.289.763.3303.532.763.3300,93
2018ORG03SCC2.977.010.0003.206.440.0000,93
2017ORG01TE45.920.635.98050.427.961.9900,91
2018ORG01TE35.587.456.09039.073.626.0900,91
2017ORG03TE5.183.040.0205.641.960.0200,92
2018ORG03TE4.398.580.6304.636.480.6300,95


I can do some calculates about organizaon , Category, and Year
I just want merge this calculates in one clustered column chart

For example 
ORG01  CATEGORY  A/B + ORG03 and ORG04 Totals A/B + YEARS TOTAL+ AB

Yon  find  example picture and power bI file  in the  below link   

picture 
 https://1drv.ms/u/s!AtrShuJq6Tbz70llIW8XSxEvFWiv

PBI  file 
https://1drv.ms/u/s!AtrShuJq6Tbz70qlvBFnkjJDMuQ3

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @sinanalmac

After my research, you could do these as below:

If you just want to merge ORG01  CATEGORY  A/B + ORG03 and ORG04 Totals A/B

That's easy to do

In Edit Queries, Select column Organization and Category then click Transform->Unpovit Columns

4.JPG

Close&Apply

Create a new a/b measure

NEW A/B = SUM('CCF (2)'[A])/SUM('CCF (2)'[B])

Then drag the field Value into Axis

5.JPG

for  YEARS TOTAL+ AB it has no Axis so it needs a separate clustered column chart

 

Or you could add a axis for it like below:

Add a Axis table with append a row of “total”

this I use Union Function create it.

6.JPG

Then create the relationship with unpivot table

7.JPG

then add a new measure as below:

Measure 2 = IF(CALCULATE(MAX('Table'[Value]),ALL('CCF (2)'[Year]))="total",CALCULATE(SUM('CCF (2)'[A]),ALLEXCEPT('CCF (2)','CCF (2)'[Value]))/CALCULATE(SUM('CCF (2)'[B]),ALLEXCEPT('CCF (2)','CCF (2)'[Value])),SUM('CCF (2)'[A])/SUM('CCF (2)'[B]))

Drag the filed into chart

8.JPG

 

here is pbix, please try it.

https://www.dropbox.com/s/h8e7exc7lpss5sj/allinone.pbix?dl=0

 

Best Regards,

Lin

 

 

 

 

 

 

 

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

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @sinanalmac

After my research, you could do these as below:

If you just want to merge ORG01  CATEGORY  A/B + ORG03 and ORG04 Totals A/B

That's easy to do

In Edit Queries, Select column Organization and Category then click Transform->Unpovit Columns

4.JPG

Close&Apply

Create a new a/b measure

NEW A/B = SUM('CCF (2)'[A])/SUM('CCF (2)'[B])

Then drag the field Value into Axis

5.JPG

for  YEARS TOTAL+ AB it has no Axis so it needs a separate clustered column chart

 

Or you could add a axis for it like below:

Add a Axis table with append a row of “total”

this I use Union Function create it.

6.JPG

Then create the relationship with unpivot table

7.JPG

then add a new measure as below:

Measure 2 = IF(CALCULATE(MAX('Table'[Value]),ALL('CCF (2)'[Year]))="total",CALCULATE(SUM('CCF (2)'[A]),ALLEXCEPT('CCF (2)','CCF (2)'[Value]))/CALCULATE(SUM('CCF (2)'[B]),ALLEXCEPT('CCF (2)','CCF (2)'[Value])),SUM('CCF (2)'[A])/SUM('CCF (2)'[B]))

Drag the filed into chart

8.JPG

 

here is pbix, please try it.

https://www.dropbox.com/s/h8e7exc7lpss5sj/allinone.pbix?dl=0

 

Best Regards,

Lin

 

 

 

 

 

 

 

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

 

Hi @v-lili6-msft,
Thank you for your Reply.  I tried your solution. And ıt's done. ıt has given me many good ideas.

Best Regards
Sinan 

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.