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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Syndicate_Admin
Administrator
Administrator

Set value to create price index

Hello everyone

I need to create a price index, but make it mobile and I took the first filtered date. I've been seeing that I can do it with FIRSTNONBLANK, but it only serves me to leave it at the card level, but I want to leave it inside a board and then plot this index. When applying the calculate function, I get an error "A 'CALCULATE' function has been used in a True/False expression that is used as a table filter expression, which is not allowed."

Finally what I want to do is the following

date cost Index

1-1-2020 100 0

1-2-2020 150 +50%

1-3-2020 200 +100

For that, P0 x 100 and the others divide P1/P0, P2/P0 and so on...

Thanks a lot.

2 REPLIES 2
amitchandak
Super User
Super User

@Syndicate_Admin , Try a new measure like

 

Meausre =
Var _1 = minx(allselcted(Table), Table[Date])
return
divide(sum(Table[index]), calculate(Table[index],Table[Date] =_1))

 

 

or a new column like
new column =
Var _1 = minx(allselcted(Table), Table[Date])
return
divide((Table[index]), calculate(sum([index]),Table[Date] =_1))

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

Thank you very much for your response, however what I want to get is the Index column in my example. You refer to Table[index], but I don't have that column in my model, I only have, Date and Price Receiving Cost.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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