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
jay_patel
Helper IV
Helper IV

How to get cumulative value.

Hello All

 

Here I am trying to get the cumulative for "Primary Sales LM(%)" with simple dax but it's not working as it is giving 100% for all rows. Mentioning Example below with Screenshot And Dax.

 

cumulative for LM % =
CALCULATE (
[Primary Sales LM(%)],
FILTER (
ALLSELECTED( SDivision ),
SDivision[SBU] <= MAX( SDivision[SBU] )
)
)
 
2)
Primary Sales LM(%) = [PS Previous Month] * 100/[primarysalesFinalfor-LM]Screenshot (44).png

 

6 REPLIES 6
amitchandak
Super User
Super User

@jay_patel , Try like

 

CALCULATE (
[Primary Sales LM(%)],
FILTER (
ALLSELECTED( SDivision ),
SDivision[SBU] = max( SDivision[SBU])
)
)

Hi Amit

 

it's giving same value for all rows "100%"

@jay_patel , Try like.

CALCULATE (
Sumx(Values(SDivision[SBU]),[Primary Sales LM(%)]),
FILTER (
ALLSELECTED( SDivision ),
SDivision[SBU] = max( SDivision[SBU])
)
)

 

Can you share sample data and sample output in table format?

Hey Amit

 

Thanks for your efforts, but above mentioned dax does'nt worked,all are giving same result. i.e., 100 % for all rows. 

So I tried this dax

 

**bleep** for % =
CALCULATE (
[Primary Sales LM(%)],
FILTER (
ALLSELECTED( SDivision ),
SDivision[SBU] = MAX( SDivision[SBU]) && [Primary Sales LM(%)] >= ([Primary Sales LM(%)])
)
)
 
and i would like to add ''MIN'' Function in the last line for '[Primary Sales LM(%)]' but it's a measure so it will not work, and i can't convert it into Calculated column. So can you help me to suggest any alternate dax for this.
 
Thanks in Advance

Hi @jay_patel,

Can you please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@jay_patel , sorry I missed Less than , but 100% create a doubt

 

CALCULATE (
Sumx(Values(SDivision[SBU]),[Primary Sales LM(%)]),
FILTER (
ALLSELECTED( SDivision ),
SDivision[SBU] <= max( SDivision[SBU])
)
)

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.