Forum Discussion
Anonymous
3 years agoNot applicable
How to summarize /group by/ count measure values
Hi all, I have trouble with grouping measure values. I have table events with columns: Product, measure Price1 (p1) and then created measure Price2 (p2) from p1, and then Differece between these...
FreemanZ
Super User
3 years agohi Anonymous
following your description, you may try to create a measure like this:
Measure =
VAR _table1 =
ADDCOLUMNS(
SUMMRIZE(
Products,
Products[Product],
Products[P1]
),
"p2", [p2]
)
VAR _table2 =
ADDCOLUMNS(
_table1,
"Diff",
Products[p1]-[p2]
)
VAR _diff = SELECTEDVALUE(SegmentTable[Diff])
RETURN
COUNTROWS(FILTER(_table2), [Diff]= _diff )
The measure is supposed to plot a table visual with the SegmentTable[Diff] column. The Products table and SegmentTable are unrelated.
if case of issue, please consider providing some sample data.
- Anonymous3 years agoNot applicable
Hi FreemanZ ,
Unfortunatelly it is not working. Also p1 is a measure, and it is all one same table (Events).
it is not allow me to add in selectedvalue a measure