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
Jason_K
Regular Visitor

referencing a calculated measure value, a row above

Hi all

 

i am working on some data where i have been using multiple measures to work out a forecast of sorts

the forecast value should be in column "Measure 5" which should be "sum of sales in previous month" + "sum of sales in the same period last year" - "sum of sales in the same period last year a month prior"

eg. measure 5 for "2023-08" should be Sum of 2023-07 sales + sum of 2022-08 sales - sum of 2022-07 sales

 

the issue i come across is that i need to populate the Column "Measure 6" with the calculated value from "Measure 5"

eg. value for "Measure 6" 2023-09 needs to be the calculated value for "Measure 5" 2023-08 which is "237,918.59"

 

so far "Measure 6" is if Sales column is blank then calculate previous month total sales, i tried adding the value for "Measure 5" into the next row, but this creates a circular reference as "Measure 5" references "Measure 6"

 

"sales LY" is sum sales from previous year and "measure 4" is sum sales last year minus a month which is working as expected

Jason_K_0-1693440049957.png

 

1 ACCEPTED SOLUTION

Hi,

Please find attached the PBI file.

Hope this helps.

Ashish_Mathur_0-1693448712811.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

I can try.  Share the download link of the file and show the expected result of Measure5 and Measure6 clearly for a few rows.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish

 

the below table is the expected results, and i have also linked a sample data for the pbix file

 

 

Year-MonthSalesMeasure 6Sales LYMeasure 4Measure 5
Jan-22244283.168    
Feb-22224393.764    
Mar-22241754.498    
Apr-22225907.883    
May-22238466.849    
Jun-22232921.831    
Jul-22230250.714    
Aug-22244639.15    
Sep-22235385.347    
Oct-22236243.386    
Nov-22238495.042    
Dec-22238328.802    
Jan-23236112.364 244283.168  
Feb-23217532.405 224393.764244283.168 
Mar-23250435.421 241754.498224393.764 
Apr-23229995.665 225907.883241754.498 
May-23255642.994 238466.849225907.883 
Jun-23246647.513 232921.831238466.849 
Jul-23229635.974 230250.714232921.831 
Aug-23 229635.97244639.15230250.714244024.41
Sep-23 244024.41235385.347244639.15234770.61
Oct-23 234770.61236243.386235385.347235628.65
Nov-23 235628.65238495.042236243.386237880.30
Dec-23 237880.30238328.802238495.042237714.06
Jan-24 237714.06236112.364238328.802235497.62

 

https://drive.google.com/file/d/1wJTG0qC5Pesjn1X44NtcVsEK6Ie8galA/view?usp=sharing 

Hi,

I get an access denied message.  I'd request you to share the download link of an Excel workbook.  In that workbook, ensure that you write formulas to get your desired result.  I will try to translate those formulas in the DAX language.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish

sorry about that, i have updated the share premissions on the link, you should be able to acccess the PBIX now

 

below is a link to a excel sheet of what i would like to do in power bi, with excel formulas

https://docs.google.com/spreadsheets/d/1GF52i0jm24iutbE-9Nm-nMHi-YSoowSY/edit?usp=sharing&ouid=10062... 

 

 

 

thanks 

 

Hi,

Please find attached the PBI file.

Hope this helps.

Ashish_Mathur_0-1693448712811.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks Ashish

i will try and breakdown your solution and apply it to my pbix

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.