Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi
I have a table looks like this:
What I want to achieve is to count the occurrence of the client no. where the Position is 10.
I want to use Card visualization in my report:
1. have a total buying customer (the distinct count of client no) 20
2. 16 of them are buying for the first time ( the distinct count of client no =1 )
3. 4 of them are returning (the distinct count of client no >1)
The report should have three Cards:
Please help 😞
Solved! Go to Solution.
Hello @dgdgdg122db
We need just a few measures to get what you are looking for.
A count of all the rows, this we will use for filtering later.
Line Count = COUNTROWS ( 'Table' )
A count of the distinct customers (the 20)
Buying Customers = DISTINCTCOUNT ( 'Table'[Client no] )
The first time buyers
First Time Buyers =
CALCULATE (
[Buying Customers], FILTER ( VALUES ( 'Table'[Client no] ) , [Line Count] = 1 )
)
And the returning customers
Returning Customers =
CALCULATE (
[Buying Customers], FILTER ( VALUES ( 'Table'[Client no] ) , [Line Count] > 1 )
)
I'm not sure what you mean about the filter on position 10 but the position filed can be added as a page level filter and that will limit all the measures above to only calculate against the lines in position 10 if that is what you are looking for.
I have attached my sample file for you to look at.
Hello @dgdgdg122db
We need just a few measures to get what you are looking for.
A count of all the rows, this we will use for filtering later.
Line Count = COUNTROWS ( 'Table' )
A count of the distinct customers (the 20)
Buying Customers = DISTINCTCOUNT ( 'Table'[Client no] )
The first time buyers
First Time Buyers =
CALCULATE (
[Buying Customers], FILTER ( VALUES ( 'Table'[Client no] ) , [Line Count] = 1 )
)
And the returning customers
Returning Customers =
CALCULATE (
[Buying Customers], FILTER ( VALUES ( 'Table'[Client no] ) , [Line Count] > 1 )
)
I'm not sure what you mean about the filter on position 10 but the position filed can be added as a page level filter and that will limit all the measures above to only calculate against the lines in position 10 if that is what you are looking for.
I have attached my sample file for you to look at.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |