Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi I need a solution to find the previous days count. Where if i click today's date it should show the Yesterday's result.
As an sample i have attached a screenshot here.
Kindly help with your ideas thank you.
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
Selected day count measure: =
COUNTROWS( Data )
Previous day count measure: =
CALCULATE ( [Selected day count measure:], Data[Date] = MAX ( Data[Date] ) - 1 )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
Selected day count measure: =
COUNTROWS( Data )
Previous day count measure: =
CALCULATE ( [Selected day count measure:], Data[Date] = MAX ( Data[Date] ) - 1 )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you so much JIHWAN_Kim
hah, your solution looks simpler and faster than mine Jihwan. 😄
My only comment is I do still prefer SELECTEDVALUE to MAX because the measure only makes sense if exactly one date is selected.
Hello!
Try the below measure out and let me know whether it works for you or not. 😄
Yesterday Count =
VAR Yesterday = SELECTEDVALUE ( Table1[Date] ) - 1
-- Filters your data for yesterday's row
VAR FilteredTable =
FILTER (
ALL ( Table1 ),
Table1[Date] = Yesterday
)
RETURN
SUMX (
FilteredTable,
Table1[Count]
)
User | Count |
---|---|
47 | |
44 | |
19 | |
14 | |
14 |
User | Count |
---|---|
107 | |
56 | |
28 | |
20 | |
16 |