cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Saaam Member
Member

Total of a column

Hi,

i have two measures (simply filtered sum), if i put these in a table i cant see total of a measure.

They are formatting like "decimal number"

 

Why?

image.png

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Total of a column

Hi @Saaam 

I can reproduce your problem.

It can be fixed with [Meausre 3], [Measure 4]

 

Measure = IF(SUM(Table1[value1])>SUM(Table2[value2]),SUM(Table1[value1])-SUM(Table2[value2]))

Measure 2 = IF(SUM(Table1[value1])<=SUM(Table2[value2]),SUM(Table2[value2])-SUM(Table1[value1]))

Measure 3 = IF(HASONEVALUE(Table1[id]),[Measure],SUMX(ALL(Table1[id]),[Measure]))

Measure 4 = IF(HASONEVALUE(Table1[id]),[Measure 2],SUMX(ALL(Table1[id]),[Measure 2]))

Capture20.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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
lc_finance Senior Member
Senior Member

Re: Total of a column

Hi @Saaam ,

 

can you share the formula for these measures?

 

Regards,

 

LC

Saaam Member
Member

Re: Total of a column

Sure,
 
=if(sum(PRD_PRODJURNALROUTE[Tempo_Bollato]) > sum(OrePresenza[Ore di presenza]); sum(PRD_PRODJURNALROUTE[Tempo_Bollato]) - sum(OrePresenza[Ore di presenza]))
 
 
 
lc_finance Senior Member
Senior Member

Re: Total of a column

Hi @Saaam ,

 

 

the reason is that your formula also applies to the total.

For Total, 'tempo bollato' is higher than 'ore di presenza', so only your first formula gets calculated and not the second one.

 

If possible with your data model, the easiest way to fix this is to move your formula from a calculated measure to a calculated column. With a calculated column:

- the formula is calculated for each row

- the total is a sum of the rows

You can create a calculated column by going to Modeling -> New Column

 

Let me know if this works for you.

 

Regards,

LC

Interested in Power BI finance templates? Check out my blog at www.finance-bi.com

Community Support Team
Community Support Team

Re: Total of a column

Hi @Saaam 

I can reproduce your problem.

It can be fixed with [Meausre 3], [Measure 4]

 

Measure = IF(SUM(Table1[value1])>SUM(Table2[value2]),SUM(Table1[value1])-SUM(Table2[value2]))

Measure 2 = IF(SUM(Table1[value1])<=SUM(Table2[value2]),SUM(Table2[value2])-SUM(Table1[value1]))

Measure 3 = IF(HASONEVALUE(Table1[id]),[Measure],SUMX(ALL(Table1[id]),[Measure]))

Measure 4 = IF(HASONEVALUE(Table1[id]),[Measure 2],SUMX(ALL(Table1[id]),[Measure 2]))

Capture20.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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

Saaam Member
Member

Re: Total of a column

It works!

 

Thanks!

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)