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 need to create a custom measure for a P&L format that shows the value based on the row name of a matrix table. The data is as follows;
The requirement is to calculate the Gross Profit using a measure (i.e. Rev - COS) that will show as 60 in front of the GP (Gross Profit) line as shown below.
The following measures were created accordingly.
After doing some research I have used the SWITCH command to show the result. When the variable for the value to be used when the CurrentItem = Gross Profit is entered manually, the value is shown accordingly in the table as follows;
However, the problem appears when you assign the already created measure (i.e. Gross Profit) where the row dissapears from the table and no value is shown.
Appreciate the assistance on the DAX command in resolving the issue.
Thanks
Solved! Go to Solution.
Hi, @micro20
Thank you for your feedback.
You can remove the filter inside the measure.
Please try the below, and check the sample pbix file that has a relationship between two tables.
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.
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, @micro20
Please check the below picture and the sample pbix file's link down below.
I wrote exactly the same measures as yours.
I think you have automatically created a relationship between two tables.
if you disconnect it, I think you can have the result that you want.
https://www.dropbox.com/s/fseim1se3j50fq5/micro20.pbix?dl=0
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: https://www.linkedin.com/in/jihwankim1975/
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 Jihwan Kim.
Thank you for the solution. Yes when the relationship is removed the result needed appears.
However, does that mean we cannot have any relationships linking the tables to each other? Is there a work around where the relationship is intact and desired result is still achieved?
Appreciate the effort.
Hi, @micro20
Thank you for your feedback.
You can remove the filter inside the measure.
Please try the below, and check the sample pbix file that has a relationship between two tables.
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.
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 Jihwan Kim,
Accept the above as the solution and well explained.
Thank you for the effort which is very much appreciated.
Best Regards
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 |
---|---|
46 | |
26 | |
22 | |
12 | |
8 |
User | Count |
---|---|
74 | |
51 | |
45 | |
16 | |
12 |