Forum Discussion
Harry1980
4 years agoHelper I
Check for different values in the same row
Hi, I would like to create a measure which is checking whether a row contains different values. Actually in my company we have several affiliated entities. And it might occur that 2 (or even mor...
- Anonymous4 years ago
The Answer is Here.
Measure = VAR _count = CALCULATE ( DISTINCTCOUNT ( 'Table (7)'[Price] ), ALLEXCEPT ( 'Table (7)', 'Table (7)'[Material ID] ) ) RETURN IF ( _count = 1, "FALSE", "TRUE" )
Anonymous
4 years agoNot applicable
For Measure, you can use this
Check for different purchase prices =
IF (
SELECTEDVALUE ( 'Table'[IDPurorg] ) = SELECTEDVALUE ( 'Table'[1Purorg] )
&& SELECTEDVALUE ( 'Table'[IDPurorg] ) = SELECTEDVALUE ( 'Table'[2Purorg] )
&& SELECTEDVALUE ( 'Table'[IDPurorg] ) = SELECTEDVALUE ( 'Table'[3Purorg] )
&& SELECTEDVALUE ( 'Table'[1Purorg] ) = SELECTEDVALUE ( 'Table'[2Purorg] )
&& SELECTEDVALUE ( 'Table'[1Purorg] ) = SELECTEDVALUE ( 'Table'[3Purorg] )
&& SELECTEDVALUE ( 'Table'[2Purorg] ) = SELECTEDVALUE ( 'Table'[3Purorg] ),
"FALSE",
"TRUE"
)
OutPut : -
- Harry19804 years agoHelper I
Hi Vairag99, thank you for your support. I think there is a misunderstanding due to showing my table as a pivot. I apologize. For my measure I will need to use 3 fields from the same table ("PurchasePrice").
1) dimPurchasePrice[MaterialID]
2)dimPurchasePrice[PurOrg]
3)dimPurchasePrice[Price]
All the needed purchase org info are retrieved from only 1 field, namely dimPurchasePrice[PurOrg]. I.e. the field dimPurchasePrice[PurOrg] can have the following values. PurOrg 1, PurOrg2, PurOrg3 or PurOrg4 (like below)
Do you also have an idea to get it work with the layout below?
Many thanks in advance
Br
Harry
Material ID PurOrg Price A PurOrg1 2 A PurOrg2 2 A PurOrg3 2 A PurOrg4 2 B PurOrg1 2 B PurOrg2 3 B PurOrg3 5 B PurOrg4 2 - Harry19804 years agoHelper I
I hope this layout is better and understandable
- Anonymous4 years agoNot applicable
The Answer is Here.
Measure = VAR _count = CALCULATE ( DISTINCTCOUNT ( 'Table (7)'[Price] ), ALLEXCEPT ( 'Table (7)', 'Table (7)'[Material ID] ) ) RETURN IF ( _count = 1, "FALSE", "TRUE" )