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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
LudivineLOU
Helper I
Helper I

wrong total

Hello, 

 

I have a wrong total for my column QTY_conf comparing to the table :

 

LudivineLOU_1-1598275836894.png

 

LudivineLOU_3-1598276223088.png

 

 

Do you know why I have only 550 in total ? 

 

Thank you,

Best regards, 

Ludivine 

 

 

1 ACCEPTED SOLUTION

Hi, @LudivineLOU 

The formula is correct for the calculation results of the data in each row of the table.

But when calculating the total row, it will first find the largest max  [Pur. Doc. Itm]   (60120267700700001), so you will get the QTY (550) where   [Pur. Doc. Itm] = max  [Pur. Doc. Itm]   (60120267700700001).

 

As a  workaround , you can try to create another measure to modify the total:

 

Qty_conf = CALCULATE(SUM(ZE[SUMQTY]),FILTER(ZE,ZE[Pur.Doc.Itm]=MAX(GR[Pur.Doc.Itm])))
Qty_conf2 = 
VAR __table = SUMMARIZE(GR,[Pur.Doc.Itm],"__value",[Qty_conf])
RETURN
IF(HASONEVALUE(GR[Pur.Doc.Itm]),[Qty_conf],SUMX(__table,[__value]))

 

209.png

 

Please refer to the sample pbix file attached for more details.

 

Best Regards,
Community Support Team _ Eason
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

5 REPLIES 5
amitchandak
Super User
Super User

@LudivineLOU , is qty_conf is a measure. Then try like

 

qty_conf  new = sumx(values(Table[vendor]),[qty_conf ])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Unfortunetaly, I got the same result 😞

 

MESURE 2 =

LudivineLOU_0-1598277783542.png

 

mussaenda
Community Champion
Community Champion

Hi @LudivineLOU ,

 

It is better if you will show how you created your measure/calculated column.

 

It is a formula in interaction with an other table called ZE.

Qty_conf = CALCULATE(SUM(ZE[SUMQTY]);FILTER(ZE;ZE[Pur. Doc. Itm]=MAX(GR[Pur. Doc. Itm])))

 

Thanks

Hi, @LudivineLOU 

The formula is correct for the calculation results of the data in each row of the table.

But when calculating the total row, it will first find the largest max  [Pur. Doc. Itm]   (60120267700700001), so you will get the QTY (550) where   [Pur. Doc. Itm] = max  [Pur. Doc. Itm]   (60120267700700001).

 

As a  workaround , you can try to create another measure to modify the total:

 

Qty_conf = CALCULATE(SUM(ZE[SUMQTY]),FILTER(ZE,ZE[Pur.Doc.Itm]=MAX(GR[Pur.Doc.Itm])))
Qty_conf2 = 
VAR __table = SUMMARIZE(GR,[Pur.Doc.Itm],"__value",[Qty_conf])
RETURN
IF(HASONEVALUE(GR[Pur.Doc.Itm]),[Qty_conf],SUMX(__table,[__value]))

 

209.png

 

Please refer to the sample pbix file attached for more details.

 

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.