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 all,
I am trying to understand how Power BI is working in this scenario.
I have a "Project" table joined to a "Tasks" table one a one to many relationship on the project ID
I have a slicer on the page, selecting the project.
I have a table, where I need to show l by row the status of several fields.
For this scenario, I am just using a simple IF statement. With the first example below, I am not using the "Else" part of the clause and the query is filtering correctly. Note the two rows with no value returned
Now, if I add the "ELSE" part in. The table is now returning every record, but not matching anything.
Can anyone please explain what is going on here? This makes no sense to me
(note: i know there are other and probably better ways to achieve this, but I want to understand why this partiuclar scenario behaves like it does, I cannot find an answer)
thanks
Hi @Anonymous ,
I guess "EXTAG#" and "As received test" columns are not in the same table, if you don't put the measure
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
No, they are in the same table.
Hi @Anonymous
The IF statement is based on what exists in the "As Received Text" field. In your second snippet, there are no values (i.e. it's blank) therefore the "Else" kicks in which is "WTF". In your first image, you have 1 in there, therefore, you the IF = 1 is TRUE, therefore, output is "Complete".
If there is additional data, please provide. However, looking at the two images and the outputs, the logic seems to flow as would be expected.
Hope this makes sense?
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi Theo,
Look at the first image. There are only two rows where the "As received" value is not 1. (they are zero)
and there are only 15 records in total.
In the second image, every single record now has the "As received" value as null. The filter context is some reason no longer applying and every single record in the database is being returned.
This only happens after I add the "else" part.
I would have expected the second image to match the first image, but the original two records not matching should now have "WTF". Not the whole dataset.
This is what I am not understanding.
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 | |
104 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |