Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have one table called FrontlineVisit. In this table I have columns CustomerId and CustomerType. In CustomerType column there are basically 3 paramaters - Ordering Client, Non Ordering, Prospect.
I am trying a measure - In this I want a table in return which will have all unique CustomerId with their customerType as Prospect.
For example if the main-table is -
CustomerID CustomerType
1 Prospect
2 Ordering Client
3 Prospect
4 Non ordering
So the measure should return the following table -
Customer ID
1
3
I'll apply this measure in a summerization formula like Countrow.
Pls help!!
Solved! Go to Solution.
Hi, @rohanjha1988 ;
You could create a new table as follows:
newtable =
SUMMARIZE (
FILTER (
'Table',
[CustomerType] = "Prospect"
&& CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[CustomerID] ) ) = 1
),
'Table'[CustomerID],
'Table'[CustomerType])
and the measure is below:
count =
var _newtable = SUMMARIZE(FILTER('Table',[CustomerType]="Prospect"&&CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[CustomerID]))=1),'Table'[CustomerID],'Table'[CustomerType])
return COUNTROWS(_newtable)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @rohanjha1988 ;
You could create a new table as follows:
newtable =
SUMMARIZE (
FILTER (
'Table',
[CustomerType] = "Prospect"
&& CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[CustomerID] ) ) = 1
),
'Table'[CustomerID],
'Table'[CustomerType])
and the measure is below:
count =
var _newtable = SUMMARIZE(FILTER('Table',[CustomerType]="Prospect"&&CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[CustomerID]))=1),'Table'[CustomerID],'Table'[CustomerType])
return COUNTROWS(_newtable)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@rohanjha1988 , Create a measure like this and use it with customer id in visual
count 1= countrows(filter(Table, Table[CustomerType] ="Prospect"))
Actually I have to calculate month wise numbers of new prospects. Now for this I need the table returning CustomerID only with Prospect filter. Then only I can go ahead and calculate this.
Is there any way of getting that table?
new table = calculatetable(Table, Table[CustomerType] ="Prospect")
Table in a measure
measure =
var _tab = summarize(filter(Table, Table[CustomerType] ="Prospect"), [Customer ID])
return
countrows(filter(Table, Table[Customer ID] in _tab ))
This formula is working but it is not able to filter on unique customer ID. We need to get the count of unique customer ID.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
50 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |