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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
SP_1
Frequent Visitor

Need help on DAX measure on running multiplication value from Previous row value - Power bi

Hi,
Power BI
Need help on creating measure on running multiplication value from Previous value
Using Date hirerachy ( Year -> Month in my Power BI table visual)
below is the sample screen shot as output.

SP_1_0-1707545817097.pngSP_1_1-1707545850312.png

 

SP_1_2-1707545891038.png

 

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

Hi, @SP_1 


you need month number column in your table
try below measure

 

Measure 4 = 
PRODUCTX(
    FILTER(
        ALL('Table (2)'),
        'Table (2)'[year]=MAX('Table (2)'[year]) && 
        'Table (2)'[month number]<=MAX('Table (2)'[month number])
    ),
    'Table (2)'[value]
)



 

Dangar332_0-1707670499240.png

 

and change decimal number of measure to 5

 

View solution in original post

6 REPLIES 6
talespin
Solution Sage
Solution Sage

hi @SP_1 

 

Another method, I have used Date table(Calendar) and Fact table(ProductTbl), linked one to many relationship. To sort the results I have also added YearMonth to table but changed font color to white so it is not visible, MonthYear or date is needed to show results sorted, if sort is not required, you can skip this step.

 

MProductTest =
VAR _SelYr = SELECTEDVALUE('CALENDAR'[YEAR])
VAR _SelMth = SELECTEDVALUE('CALENDAR'[MonthNo])
VAR _Dt = DATE(_SelYr, _SelMth, 1)
VAR _Product = CALCULATE(PRODUCT(ProductTbl[Value]), REMOVEFILTERS(ProductTbl[Value]), 'CALENDAR'[Date] <= _Dt)
RETURN IF( ISBLANK( MAX(ProductTbl[CapDate]) ), BLANK(), _Product)
 

talespin_0-1707698567056.png

 

Dangar332
Super User
Super User

Hi, @SP_1 


you need month number column in your table
try below measure

 

Measure 4 = 
PRODUCTX(
    FILTER(
        ALL('Table (2)'),
        'Table (2)'[year]=MAX('Table (2)'[year]) && 
        'Table (2)'[month number]<=MAX('Table (2)'[month number])
    ),
    'Table (2)'[value]
)



 

Dangar332_0-1707670499240.png

 

and change decimal number of measure to 5

 

Hi @Dangar332 
Thanks for the solution 

ribisht17
Super User
Super User

Hi @SP_1 

 

Please check this https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-Multiplying-V...

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

Hi @ribisht17 

I already tried  but its not working for date hierarchy (Year / Month)

Thanks

SP_1
Frequent Visitor

Need DAX code

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.