Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, The DAX measure I want to improve is tractor count. It counts distinct tractor numbers.
Tractor # = CALCULATE(DISTINCTCOUNT('Table'[ivh_tractor]), GROUPBY('Table','Table'[ivh_driver]))
What I want to achieve is that the "1"s highlighted in the table should be blank because they have been countetd in the previous rows. Here is the sample dataset. Thank you for your input.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jdTbjsIgEAbgd/HaRIYzl7QlS5WKwVM2xvd/jW02BdRJW+9M/NLM/PzweGzEju4ooXSz3TQxdPY4/lCgOYCgdvwNCsDozXP7TpNrYjNRzpScKCNyhRpYoNfUekvYhJlQZMIcxCce5d5ZAnUIPWHxBTZiAcfYxWv9LiuUIXpNB3d8+a7geWKGQsNYzOPO3s7e1XnVRKUCTO8u3HJoCsq5KbTaO9VltTU61sHMU9fdW5/KqfE8KwW01kiT+ylr6XxmkqNsP6hh89TbcEm1OGMI/yMoxfn4/xrWcgH3YW8HoBWX4lDUXx/TxcdywEzIHJrELfvEhsA8Dr+x6UMegtPcMilQG4Y2HNztpWUMpvUYDm5ojwcf63LlcoJZo3SB9sGlvq6mWU6YGJTwyaY2JkJLaFxPGIAg7O3Q5yeKqRqZRE1LtkvxWOdV5RbzFWro91Qu0NidbH5GmNS1C4ieL/bsX54nSkRJdxUzo+fxWLHBJiLKGCY/qVQjfO9Dig1R9RqRcufQuSFs+Ct+/gE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [delivery_date = _t, ivh_driver = _t, ivh_invoicenumber = _t, ivh_tractor = _t])
in
Source
Solved! Go to Solution.
Hi @teresating886 ,
Try this.
Tractor # =
COUNTROWS(
FILTER(
'Table',
'Table'[ivh_invoicenumber]=CALCULATE(MIN('Table'[ivh_invoicenumber]),ALLEXCEPT('Table','Table'[ivh_driver]))
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @teresating886 ,
Try this.
Tractor # =
COUNTROWS(
FILTER(
'Table',
'Table'[ivh_invoicenumber]=CALCULATE(MIN('Table'[ivh_invoicenumber]),ALLEXCEPT('Table','Table'[ivh_driver]))
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Did you created any measure or is it a direct column that you are using in visual?
Thanks,
Arul
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
84 | |
70 |