Forum Discussion
looking for proper calculation
Good day,
I have the following question.
If the LEVEL is not the same, but the PARTNUMBER_SUP and the LMUT_DAT is the same, then I want a calculation (measure?) which gives me the outcome "yes".
If the LEVEL is the same, as well as the PARTNUMBER_SUP and the LMUT_DAT, the the outcome should be "no".
Thanks upfront for your assistance!
John
- Anonymous5 years ago
Hi Anonymous ,
You can create a measure as below, please find the details in the attachment.
Measure = VAR _ps = SELECTEDVALUE ( 'Table'[partnumber_sup] ) VAR _idate = SELECTEDVALUE ( 'Table'[lmut_dat] ) VAR _count = COUNTROWS ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[partnumber_sup] = _ps && 'Table'[lmut_dat] = _idate ) ) RETURN IF ( _count = 1, "oke", "double mutation" )Best Regards
4 Replies
- TomMartensSuper User
Hey Anonymous ,
can you please prepare sample data, either an Excel file or a pbix. Upload the file to onedrive or dropbox and share the link. Describe the expected result based on the sample data.
From the data from the screenshot, I wondering what the expected result will look like when you change the level from 599511 --> 599510.
A measure is required if the result changes depending on slicer selections. This is also something you have to consider preparing sample data.
Regards,
Tom
- AnonymousNot applicable
Hi TomMartens ,
Sorry for late reply, something called work came in between😁
Here is the link: https://www.dropbox.com/s/5hqt5a8dixl4r82/data.xlsx?dl=0
in the last column, the outcome is mentioned.
So, if the level is not the same, the partnumber_sup is the same and the Lmut_dat is the same, the outcome must be: double mutation
Thanks!
John
- AnonymousNot applicable
Hi Anonymous ,
You can create a measure as below, please find the details in the attachment.
Measure = VAR _ps = SELECTEDVALUE ( 'Table'[partnumber_sup] ) VAR _idate = SELECTEDVALUE ( 'Table'[lmut_dat] ) VAR _count = COUNTROWS ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[partnumber_sup] = _ps && 'Table'[lmut_dat] = _idate ) ) RETURN IF ( _count = 1, "oke", "double mutation" )Best Regards