cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper III

MAXX of Measure not giving expected result

Hello,

Here's the short on the issue

I want to return the top category and value for this measure. However writing the dax for it gives me the wrong result.

I have the following measure calculating the difference between two snapshot values in a table as follows

``````Total R4Q ACV Motion LW % =
VAR CurrentPipe = CALCULATE (
SUM ( 'CX Pipe Motion'[ACV EUR] ),
REMOVEFILTERS( 'CX Pipe Motion'[Snapshot Short Desc]),'CX Pipe Motion'[Snapshot Short Desc] = "Today" && 'CX Pipe Motion'[DRM cont] in {"Active", "Booked/Won"} && 'CX Pipe Motion'[Closing Quarter] in {"2022-Q4", "2023-Q1", "2023-Q2", "2023-Q3"})

VAR LWPipe = CALCULATE (
SUM ( 'CX Pipe Motion'[ACV EUR] ),
REMOVEFILTERS( 'CX Pipe Motion'[Snapshot Short Desc]),'CX Pipe Motion'[Snapshot Short Desc] = "Today -7" && 'CX Pipe Motion'[DRM cont] in {"Active", "Booked/Won"} && 'CX Pipe Motion'[Closing Quarter] in {"2022-Q4", "2023-Q1", "2023-Q2", "2023-Q3"})

RETURN

((CurrentPipe - LWPipe) / LWPipe )``````

Now trying to get the MAX of this measure

I've used this to get the max category but i'm getting the above result instead.

``````Max LW R4Q Solution % =
MAXX(
TOPN(1, 'CX Pipe Motion', [Total R4Q ACV Motion LW %], DESC),
'CX Pipe Motion'[Solution Area L3]
)``````

Thanks a lot

Quentin

1 ACCEPTED SOLUTION
Community Champion

``````Max LW R4Q Solution % =
MAXX(
TOPN(1, VALUES('CX Pipe Motion'[Solution Area L3]), [Total R4Q ACV Motion LW %], DESC),
'CX Pipe Motion'[Solution Area L3]
)``````

Proud to be a Super User!

4 REPLIES 4
Community Champion

Hi,

Can you please share a clear screenshot and have some sample data . It is very hard to read and understand.

Proud to be a Super User!

Helper III

Hi Farhan,

Here is the table. I expect the result to display the top solution by % change.

It's showing me a different solution than expected

Community Champion

``````Max LW R4Q Solution % =
MAXX(
TOPN(1, VALUES('CX Pipe Motion'[Solution Area L3]), [Total R4Q ACV Motion LW %], DESC),
'CX Pipe Motion'[Solution Area L3]
)``````

Proud to be a Super User!

Helper III

Hi Farhan,

It's working if I change to ASC. Thank you!

``````Max LW R4Q Solution % =
MAXX(
TOPN(1, VALUES('CX Pipe Motion'[Solution Area L3]), [Total R4Q ACV Motion LW %], ASC),
'CX Pipe Motion'[Solution Area L3]
)``````

Announcements

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors