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.
I need help with a preety simple problem, I have a simple base such as:
License Plate | Shipping co Name | Route |
AAA1000 | A | 1010 |
AAA1000 | A | 1020 |
BBB2000 | A | 2010 |
CCC3000 | A | 3010 |
CCC3000 | A | 3020 |
CCC3000 | B | 3030 |
CCC3000 | C | 3040 |
DDD4000 | A | 4010 |
DDD4000 | B | 4020 |
DDD4000 | B | 4030 |
EEE5000 | B | 5010 |
As you can see a truck can have multiple routes and multiple shipping companys, I need to check wheter or not a license plate is registered to a especific shipping company with the desired outcome:
License Plate | Qty of Shipping co | Registered to B? |
AAA1000 | 1 | No |
BBB2000 | 1 | No |
CCC3000 | 3 | Yes |
DDD4000 | 2 | Yes |
EEE5000 | 1 | Yes |
However the best that I got was using the FIRSTNONBLANK formula and get the first company that appeard in the data set:
License Plate | Qty of Shipping co | Shipping co Name |
AAA1000 | 1 | A |
BBB2000 | 1 | A |
CCC3000 | 3 | A |
DDD4000 | 2 | A |
EEE5000 | 1 | B |
Solved! Go to Solution.
Hi, @Anonymous
Thank you for your feedback.
If you want to create a new table, the formula is different.
Please try the below for creating a new table.
New Table =
SUMMARIZE (
'Table',
'Table'[License Plate],
"Qty of shipping co", DISTINCTCOUNT ( 'Table'[Shipping co Name] ),
"Registered to B", IF ( { "B" } IN VALUES ( 'Table'[Shipping co Name] ), "Yes", "No" )
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @Anonymous
Please correct me if I wrongly understood your question.
Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.
All measures are in the sample pbix file.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello @Jihwan_Kim, thanks for your reply.
It worked great on the report, however I need this formulas to work on the tables, so I can use the information as a filter to create a few charts. I tried using the same formula, but it didn't work
Hi, @Anonymous
Thank you for your feedback.
If you want to create a new table, the formula is different.
Please try the below for creating a new table.
New Table =
SUMMARIZE (
'Table',
'Table'[License Plate],
"Qty of shipping co", DISTINCTCOUNT ( 'Table'[Shipping co Name] ),
"Registered to B", IF ( { "B" } IN VALUES ( 'Table'[Shipping co Name] ), "Yes", "No" )
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |