Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a Sales Table that shows the sale pay date and the date that the client in fact payed for the product, called "Sales Off".
If today is greater than the pay date and the Sales Off cell is empty, it means that the client has default.
How can I build a measure that shows how many default days each client is?
@Anonymous Perhaps something like:
Days in Default Measure =
VAR __Today = TODAY()
VAR __PayDate = MAX('Table'[Sales Pay Date])
VAR __SalesOff = MAX('Table'[Sales Off])
RETURN
IF(__Today > __PayDate && ISBLANK(__SalesOff),(__Today - __PayDate)*1.,BLANK)
This will return me just a single value, but I need a value for each client. I have build a measure to sum the amount defaulted, maybe this can help to understand what I mean:
CALCULATE(
sum('Sales Table'[Amunt]),
FILTER(
'Sales Table',
'Sales Table'[sales Off] = BLANK() &&
'Sales Table'[pay date] < TODAY()
)
)
@Anonymous Well, I assumed that you would put the measure into something like a table visualization along with the client or whatever you needed it by. So, create a table visual and put the client field in the Values field well. Then place the measure into the field well.
I will do this too, but I also need to do the geometric avarege of days default
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |