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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Adam15
Frequent Visitor

SelectedValue and Dates

Hello,

 

I'm trying to make a report that shows the stock size, prize and total value of different items. I need to tell the total value using different approaches: Value when bought, Value of the average last 6 months selling price, Value on the last selling price. And I need to use a slicer to change the date I'm checking.

When I'm using this measure, it can show the current value on last selling price on febr 29:

Last Selling Value = calculate(SUMX(SUMMARIZE(Invoice,Product[Name],Depot[Name]),[Last Selling Price]*Calculate(SUM(Depot[Ammount]), 'Date'[Date]=DATE(2024,02,29)),All('Date'[Date]))
 
But when I'm trying to change the DATE(2024,02,29) to SELECTEDVALUE('Date'[Date]) it shows BLANk. On the slicer I can choose only a value, not multiple.
I have tried to rewrite the measure using MIN, MAX, LASTDATE but I had no success yet. What can I do?
1 ACCEPTED SOLUTION
timalbers
Super User
Super User

Could you just leave out the ALL'Date'[Date] ) of the "Last Selling Value" measure.
This is an explicit filter context which prevents the slicer filter from filtering your dates.


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

View solution in original post

4 REPLIES 4
timalbers
Super User
Super User

Could you just leave out the ALL'Date'[Date] ) of the "Last Selling Value" measure.
This is an explicit filter context which prevents the slicer filter from filtering your dates.


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

It works for every product we sold that day, but  for those we haven't it gives blank back.

edit: I got it, I just had to replace the Invoice to Depot in the Summarize.

timalbers
Super User
Super User

Hi @Adam15 ,

 

based on the information you gave, here is some advise:

  • Make sure you are using the exact same Date field in your slicer as you use for SELECTEDVALUE
  • Make sure the relationship between your date table and the fact table is set up correctly (maybe share here)
  • Also it is important how you set up the Last Selling Price measure (maybe you could share this one's DAX as well here)

Hope this helped you in some way already

 

Cheers

Tim


—————————————————————————————
✔️ If my answer helped you, please consider marking it as a solution.

The first two is good, I can't really show picture, because the tables are on my native language, I just translated the columns when I asked.

 

This is the measure for the last selling price:

Last Selling Price = Calculate(max(Invoice[Price]), all('Date'[Date]))
I work in an industry where the last selling price is equal to the maximum.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.