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
tobirz
Frequent Visitor

Row total to show value of max selected value

Hi everyone,

 

Is there a way to have powerbi show the total to show the value of the max selected value.

 

For instance

 

Client NameLocationJanuary 2019May 2021Total
Client AUSA201010
Client BMexico70150150
Client CJapan200210210

 

Please note that the month values is a calculated measure so I didnt get the option to show measure as: sum, average etc.

 

Regards

 

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

Hi @tobirz ,

 

I think your table should look like as below.

1.png

Create a measure.

Measure = 
IF(
HASONEVALUE('Table'[Month]),
SUM('Table'[Value]),
VAR _MAXMONTH = MAX('Table'[Month]) 
RETURN 
CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Client Name]),'Table'[Month] = _MAXMONTH))
)

Result is as below.

1.png

 

Best Regards,
Rico Zhou

 

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-rzhou-msft
Community Support
Community Support

Hi @tobirz ,

 

I think your table should look like as below.

1.png

Create a measure.

Measure = 
IF(
HASONEVALUE('Table'[Month]),
SUM('Table'[Value]),
VAR _MAXMONTH = MAX('Table'[Month]) 
RETURN 
CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Client Name]),'Table'[Month] = _MAXMONTH))
)

Result is as below.

1.png

 

Best Regards,
Rico Zhou

 

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

 

amitchandak
Super User
Super User

@tobirz ,

You can have measure

M1 =

maxx(Summarize(allselected(Table), Table[Client Name], Table[Location], "_1", [Measure]) , [_1])

 

use it with help from isinscope

 

if(not(isinscope(Table[Client Name]))  && not(isinscope(Table[Location])), [M1], [Measure])

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

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.