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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RakeshSinghr
Resolver I
Resolver I

Non Additive measures - overwriting row context

Hi,

 

    I have a model with 1 fact f1 and 3 dims d1, d2, d3. 

Fact has pre aggregated data and so all measures aggregationtype = none. There's a dummy measure RowCount.

 

I'm trying to achieve following in a table row: 

d1 attribute,d2 attribute ,d3 attribute ,09/11/2020, non additive measure value, non addtivive measure value on 09/10/2020

 

So basically overwriting the row context of date with a date from previous month. If the measure was additive, its relatively straightforward with calculate, values and remove filters expression but in this case the measure is non additive. 

 

Volume of fact data is huge so doing table join onto itself in M is not possible. So in dax, if there's a way to traverse date column back a month but with current row filters to create a calculated column would be ideal. Is this possible?

 

Thanks

4 REPLIES 4
amitchandak
Super User
Super User

@RakeshSinghr , the measure is pre-aggregated, are talking about column or Measure?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Its a percentage column, so a non additive measure with aggregation type = none in dataset.

by pre-aggregated i was referring to the values being precalculated in datasource table already.

 

So can't be used as a measure in dax expressions.

amitchandak
Super User
Super User

@RakeshSinghr , No very clear you can try measure like

 

measure1 =
var _date = maxx(allselected(Date),date[date])
return
calculate([measure], filter(Date, Date[date] =_max))
//calculate([measure], _max)

 

last month =
var _date1 = maxx(allselected(Date),date[date])
var _date = date(year(_date), month(_date)-1,day(_date))
return
calculate([measure], filter(Date, Date[date] =_max))

 

or measure like

MTD Sales = CALCULATE([measure],DATESMTD('Date'[Date]), filter('Date','Date'[Date]=max('Date'[Date])))
last MTD Sales = CALCULATE([measure],DATESMTD(dateadd('Date'[Date],-1,MONTH)), filter('Date','Date'[Date]=max('Date'[Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  - Thanks for the response. 

Only issue is that the measure's aggregation type = none and so cannot have that field inside of calculate (measures,..) ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.