Forum Discussion
Measure as Slicer
This has come up quite a lot, but in my case I have a relatively huge table (13 million rows, 44 columns, 20 measures), so it's a bit of a slog to try and unpack for my scenario!
Boiling it down to this issue, it is essentially a list of invoices, with whether they are paid on time or not.
I have measures that work out the % paid on time by supplier, the number of suppliers, the number of suppliers that had at least one invoice not paid on time.
Now I need to establish the % of suppliers that themselves have a specific % paid on time. For example, how many and what % of suppliers had say 75% or more of their invoices paid on time.
I tried a slicer on the measure of % paid on time, but that didn't seem to work. Additionally, I'm unable to do calculations with that measure:
The measure itself is:
Does anyone have any ideas or workarounds? Thanks.
ergocorp , if you want to use filter on measure then use the filter. Also, this need to be done with some group by
Example
sumx(filter(values(invoice[invoice_id]) , [measure]>1) ,[Measure2] )
or
Calculate( [Measure2],
filter(values(invoice[invoice_id]) , [measure]>1) )
Your [Example issue] needs a FILTER expression. Something along the lines of:
Example issue = CALCULATE ( DISTINCTCOUNT ( '01-Payments'[Supplier name] ), FILTER ( '01-Payments', [YesProportion] < 1 ) )
3 Replies
- amitchandakSuper User
ergocorp , if you want to use filter on measure then use the filter. Also, this need to be done with some group by
Example
sumx(filter(values(invoice[invoice_id]) , [measure]>1) ,[Measure2] )
or
Calculate( [Measure2],
filter(values(invoice[invoice_id]) , [measure]>1) )
- PaulDBrownCommunity Champion
Your [Example issue] needs a FILTER expression. Something along the lines of:
Example issue = CALCULATE ( DISTINCTCOUNT ( '01-Payments'[Supplier name] ), FILTER ( '01-Payments', [YesProportion] < 1 ) ) - ergocorpHelper II
Thanks both!