Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey guys,
How to get the value count for a column for previous day and plot it in clustered column chart?
CountFromPreviousDay = CALCULATE(COUNT('Check table'[UID]),FILTER('Calendar',PREVIOUSDAY('Calendar'[DATES)))
date | id |
09/06/22 | 1a |
09/06/22 | 2a |
09/06/22 | 3a |
09/06/22 | 4a |
10/06/22 | 2a |
10/06/22 | 3a |
10/06/22 | 4a |
13/06/22 | 1a |
13/06/22 | 2a |
Solved! Go to Solution.
Hi @Anonymous ,
Create an index column:
index = RANKX('Table','Table'[date],,ASC,Dense)
Then create a measure like below:
Measure = CALCULATE(COUNT('Table'[id]),FILTER(ALLSELECTED('Table'),'Table'[index]=SELECTEDVALUE('Table'[index])-1))+0
Hi @Anonymous ,
Create an index column:
index = RANKX('Table','Table'[date],,ASC,Dense)
Then create a measure like below:
Measure = CALCULATE(COUNT('Table'[id]),FILTER(ALLSELECTED('Table'),'Table'[index]=SELECTEDVALUE('Table'[index])-1))+0
Hi @amitchandak ,
thankyou for your reply. I tried your solution. Somehow it gives fridays value for saturday as [previousday value] and monday it doesn't give a previous day value.
Regards,
Shubham
@Anonymous , Try like
CountFromPreviousDay = CALCULATE(COUNT('Check table'[UID]),PREVIOUSDAY('Calendar'[DATES))
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9
check
http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |