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.
dear all
I currently have some problems to create subtotal as new row and create total from subtotal as new row. I have multiple IDs with a full row with different id.
here is my table and the expected output
https://drive.google.com/open?id=1Mk-GKsXgmJMTPeUtXNUloBK5FeIcNPKd
how i can do that in power BI,
thank you in advance
azura
Solved! Go to Solution.
Hi @azura ,
To createa some calculated tables as below.
mixd = SUMMARIZECOLUMNS(Table1[Year],"Productid",MAX(Table1[Productid]),"productname","mixd","amount",SUM(Table1[amount]))
fruits = SUMMARIZECOLUMNS(Table1[Year],"Productid",MAX(Table1[Productid]),"Productname","Fruits","amount",CALCULATE(SUM(Table1[amount]),FILTER(Table1,Table1[producename]="apple" || Table1[producename]="banana")))
vagetables = SUMMARIZECOLUMNS(Table1[Year],"Productid",MAX(Table1[Productid]),"Productname","vegaables","amount",CALCULATE(SUM(Table1[amount]),FILTER(Table1,Table1[producename]="tomatoes" || Table1[producename]="brocoli")))
Table = UNION(Table1,mixd,fruits,vagetables)
Hi @azura ,
To createa some calculated tables as below.
mixd = SUMMARIZECOLUMNS(Table1[Year],"Productid",MAX(Table1[Productid]),"productname","mixd","amount",SUM(Table1[amount]))
fruits = SUMMARIZECOLUMNS(Table1[Year],"Productid",MAX(Table1[Productid]),"Productname","Fruits","amount",CALCULATE(SUM(Table1[amount]),FILTER(Table1,Table1[producename]="apple" || Table1[producename]="banana")))
vagetables = SUMMARIZECOLUMNS(Table1[Year],"Productid",MAX(Table1[Productid]),"Productname","vegaables","amount",CALCULATE(SUM(Table1[amount]),FILTER(Table1,Table1[producename]="tomatoes" || Table1[producename]="brocoli")))
Table = UNION(Table1,mixd,fruits,vagetables)
Hi Frank;
thanks for your response, the real dataset more complex than the sample, currently i'am on going prosess to solved this with your guidace, i got the idea, and it worked in my dataset;
but i missed some calculation, like subrtraction; ( sub Mixed )
is it possible to subtracted fruit - vegetables;
i tried to create table which group by and amount is calculated filter fruit - calculated filter vegetables But Got Error;
best regards;
Azura
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |