Forum Discussion
Create a « Not In » Gauge
- 4 years ago
Hi NeimadB
I mocked some data and created a sample on that. I used below measures. Download the attachment for details and adjust the measures to fit your data.
Total Clients = DISTINCTCOUNT('report ClientProfile'[ClientId])In Clients Count = VAR vYears = ALLSELECTED('report ClientProfile'[FiscalYearId]) VAR vClients = VALUES('report ClientProfile'[ClientId]) VAR vTable = FILTER('dimension Purchases','dimension Purchases'[FiscalYearId] IN vYears && 'dimension Purchases'[ClientId] IN vClients) RETURN CALCULATE(DISTINCTCOUNT('dimension Purchases'[ClientId]),vTable)Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi NeimadB
I mocked some data and created a sample on that. I used below measures. Download the attachment for details and adjust the measures to fit your data.
Total Clients = DISTINCTCOUNT('report ClientProfile'[ClientId])In Clients Count =
VAR vYears = ALLSELECTED('report ClientProfile'[FiscalYearId])
VAR vClients = VALUES('report ClientProfile'[ClientId])
VAR vTable = FILTER('dimension Purchases','dimension Purchases'[FiscalYearId] IN vYears && 'dimension Purchases'[ClientId] IN vClients)
RETURN
CALCULATE(DISTINCTCOUNT('dimension Purchases'[ClientId]),vTable)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
I think you are right, your solution is fine (but I had to create a subview of the fact.Purchases table with only Year and CustomerId, becase I had a blank value).
To conclude, I also want to show the percentage in addition to the gauge, any suggestion how to achieve that ?
- v-jingzhang4 years agoCommunity Support
Hi NeimadB
If you want to create a subview of the fact.Purchases table, you can add a table visual into the report page and drag Year and CustomerId columns into it as Values field.
For the percentage, as you already have [Total Clients] and [In Clients Count] measures (in my previous reply), you can create one more measure Percentage = DIVIDE([In Clients Count], [Total Clients]). Under Measure tools tab, modify this measure into the percentage format. Then add a card visual and put the measure in it.
Reference:
Table visualizations in Power BI reports and dashboards - Power BI | Microsoft Docs
Card visualizations (big number tiles) - Power BI | Microsoft Docs
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.