Forum Discussion
Counting a measure return
- 7 years ago
Hi Anonymous,
Please try a solution like below.
1. Create a new table [Sellers].
Sellers = VALUES('Table'[SELLER])2. Create a measure.
Measure = SUMX ( ADDCOLUMNS ( SUMMARIZE ( 'Table', 'Table'[ITEM ID], 'Table'[SELLER], 'Table'[PRICE] ), "ifMinPrice", IF ( [PRICE] = CALCULATE ( MIN ( 'Table'[PRICE] ), ALL ( 'Table'[SELLER], 'Table'[PRICE] ), ALLSELECTED ( 'Sellers'[SELLER] ) ), 1, 0 ) ), [ifMinPrice] )
Best Regards,
Hello v-jiascu-msft,
I just wanted to update for anybody keeping up with the thread that the problem lied within the relationships between my tables. I had to delete one relationship and add a new one to make the filtering work correctly.
I appreciate your help!
Hi v-jiascu-msft; Anonymous
I have a very similar issue.
I've a measure that evaluates the ranking (of a line of production based on the number of units of production that have passed via a series of workcenters).
So BR RTG RANKING in the photo below is based on:
BR RTG RANK =
RANKX (
ALLSELECTED ( 'Pareto BR' );
[BR UFs];
;
DESC;
DENSE
)
I would like to show a COUNT of how many lines are returned for any filter.
In the above example I'd have a count of 14 (which gives me a picture of how many combinations of production I have).
Any advice here would be very much appreciated.
The PROD BR ALTS is also a measure (combining individual rankings) to show the combined rank of each step. A result of 1_1_1_1 is a route of production that uses the most popular workcenter at each step. This could also be used to give a distinct count.
PROD BR ALTS =
COMBINEVALUES (
"_";
[RTG RANK BR SA];
[RTG RANK BR MA];
[RTG RANK BR JA];
[RTG RANK BR GA]
)Cheers
zedleb
- zedleb7 years agoFrequent Visitor
I've resolved this by using a SUMMARIZED table, relating this to the fact table (it's a many to many but I set the filter from the fact table) and using the count in the visualisation.
It works very well! :smileyhappy: