Forum Discussion
list comparison from a table
Hi,
I have records of presence like this :
So each time somebody use his badge, I have a record with date and service ID.
For a selected date (lets say 08/07/2021) I would like to present in one or several table visual wich service is new and wich service came the previous day but not the selected day.
I tried with measure but have error like : "A Table of multiple values was supplied where a single value was expected"
Thanks for helping me with that,
Don
DonPepe , with help from a date table
This Day = CALCULATE(count('Table'[ID service]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(Count('Table'[ID service]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))new = countx(values(Table[ID service]), if (isblank([Last Day]) && not(isblank([This Day]) ) , Table[ID service], blank())
same approch as this one
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
2 Replies
- amitchandak
Super User
DonPepe , with help from a date table
This Day = CALCULATE(count('Table'[ID service]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(Count('Table'[ID service]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))new = countx(values(Table[ID service]), if (isblank([Last Day]) && not(isblank([This Day]) ) , Table[ID service], blank())
same approch as this one
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529- DonPepe
Helper II
Hi amitchandak ,
Thanks a lot !
I used your approach with "Date = Max date" in other measure and it help me to resolve other issue.
Well done.
Don