Forum Discussion
GlitchedDuck
4 years agoFrequent Visitor
Help Grouping Counts by Company
Hi all, I'm working on a dashboard to show live suppliers and want to show in a card how many suppliers are live in the database based on a count of invoices. i've added some data to show what i'...
- 4 years ago
Hi GlitchedDuck ,
According to your description, I create a sample.
Here's my solution, create a measure.
Count = CALCULATE ( DISTINCTCOUNT ( 'Table'[Name] ), FILTER ( ALL ( 'Table' ), 'Table'[Organization] = MAX ( 'Table'[Organization] ) && SUMX ( FILTER ( ALL ( 'Table' ), 'Table'[Organization] = EARLIER ( 'Table'[Organization] ) && 'Table'[Name] = EARLIER ( 'Table'[Name] ) ), 'Table'[Invoices] ) > 0 ) )Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yanjiang-msft
4 years agoCommunity Support
Hi GlitchedDuck ,
According to your description, I create a sample.
Here's my solution, create a measure.
Count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Name] ),
FILTER (
ALL ( 'Table' ),
'Table'[Organization] = MAX ( 'Table'[Organization] )
&& SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[Organization] = EARLIER ( 'Table'[Organization] )
&& 'Table'[Name] = EARLIER ( 'Table'[Name] )
),
'Table'[Invoices]
) > 0
)
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.