March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi dear community,
I need your help with filtering data. I need to create a measure that will calculate total amount for the previous date in table.
I have the following measure:
Solved! Go to Solution.
Solved with the following measure, proposed by @Anonymous in another topic
Solved with the following measure, proposed by @Anonymous in another topic
@Delphia , With help from date table
max date
Measure =
var _max = maxx(allselected('Date'), Date[Date])
return
CALCULATE([sales],filter('Date', 'Date'[Date] =_max))
Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...
Thank you so much for your answer.
It doesn't work for me. Let me precise a little bit my question. My scheme looks like:
Above in my question I replaced "Number of Rows" by "Sale", sorry.
I created a measure using your patern and get the following:
This will work:
Previous Date rows =
VAR PrevDate =
MAXX (
FILTER (
ALL ( 'Date' ),
'Date'[Date] < MAX ( 'Date'[Date] )
&& NOT ( ISBLANK ( [Number of rows] ) )
),
'Date'[Date]
)
RETURN
IF (
ISBLANK ( [Number of rows] ),
BLANK (),
CALCULATE (
[Number of rows],
FILTER ( ALL ( 'Date' ), 'Date'[Date] = PrevDate )
)
)
Proud to be a Super User!
Paul on Linkedin.
Thank you Paul. Please find the reponse of the system on the screenshot.
Nevertheless, the column Number of Rows exists...
Please find sample of my pbix file here: Please find my sample pbix file here: https://drive.google.com/file/d/1AWknO_abSZnNmKnzsOdKhhUdF9XbLkfb/view?usp=sharing
Thank you in advance for your help!
[Number of rows] is a measure:
Number of rows =SUM(cleaned_row_count[Number of Rows])
Proud to be a Super User!
Paul on Linkedin.
Thank you, Paul. It works as a measure, nevertheless, it shows todays values, not for the previous date. Please have a look at my screenshot:
Thank you one more time!
Hi @Delphia,
Can you please share a sample pbix file with some dummy data(keep the raw tale schema) and the expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Notice: please not add sensitive/real data in it.
Regards,
Xiaoxin Sheng
Thank you for your advice. I've added the link to my question.
Please find my sample pbix file here: https://drive.google.com/file/d/1AWknO_abSZnNmKnzsOdKhhUdF9XbLkfb/view?usp=sharing
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
84 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |