Forum Discussion
inglexjc
3 years agoPost Patron
Count rows based on data from a Measure
I have a measure so that my Column in my table "Letter Due to Supervisor" shows up blank/no date if in the Descritpion shows "Letter Wavied". Trying to get an accurate count of how many rows do have...
bolfri
3 years agoSolution Sage
Create 2 columns:
LetterWaived Flag = IF(CONTAINSSTRING('Sample'[Description_1];"Letter Waived");1;0)
LetterWaived Flag Mark =
var division = [Division]
return SUMX(FILTER('Sample';'Sample'[Division]=division);'Sample'[LetterWaived Flag])
Then the measure is:
Count of rows affeted by Letter Waived = SUM('Sample'[LetterWaived Flag Mark])
You just need to change a logic to not affected.
And for the description I think you have wrong formula, because max for strings correspondes to a sentence that has later letter in aphabet. Let me show you difference:
inglexjc
3 years agoPost Patron
What am I doing wrong? I created a new column and get this error.
- bolfri3 years agoSolution Sage
I am using Polish language in DAX, so for me separator is ;
Change all ; to , and it will be working. 🙂
- inglexjc3 years agoPost Patron
That helped but the count is still wrong. It's coming up with 83 and it should be 63
- Anonymous3 years agoNot applicable
Hi inglexjc ,
Whether your problem has been resolved? If no, could you please provide some raw data in your table 'Legal Files'(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards