Forum Discussion
Use DAX to show dates without data with previous available record
- 5 years ago
Hi, Nomadexchris
Please check the below picture and the sample pbix file's link down below.
Price Update Measure =
IF (
ISFILTERED ( Products[Product] ) && ISFILTERED ( Dates[Date] ),
CALCULATE (
LASTNONBLANKVALUE ( 'Price'[Date], MAX ( 'Price'[Price] ) ),
FILTER ( ALL ( Dates ), Dates[Date] <= MAX ( Dates[Date] ) )
)
)https://www.dropbox.com/s/yxrfqjs709fbcf4/nomadex.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hi Nomadexchris
What is the desired output for this? A table? Do you need it in PQ or in DAX?
Share a smaple of the input data in text-tabular format so that the contents can be copied
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hi AIB, thanks for the reply. The desired output would be DAX which shows all the empty dates with records from the previous date. Here is the input table.
Date Product Price
1/5/2021 Product_01 1990
2/5/2021 Product_01 1890
3/5/2021 Product_01 1790
1/5/2021 Product_02 1490
3/5/2021 Product_02 1290
7/6/2021 Product_02 1190
9/6/2021 Product_02 1290