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'm trying to get the total with the following conditions:
1. IsNet = True
2. SupplierCode = only selected code (say 1102 and 1103)
3. Specifically just for CompanyCode 6601, I would like to get the total even though IsNet is False (selected supplier code still applies)
Not sure what's the best approach. I tried to create custom column with IF statement creating True/False but, I can't get all the conditions.
This is what the data looks like:
Company Code | IsNet | SupplierCode | Total |
6601 | True/False | 1101 | |
6602 | 1102 | ||
6603 | 1103 | ||
6604 | 1104 |
Any help would be appreciated!!
Solved! Go to Solution.
@Helpful_Fun4848
Create the following measure:
Total Measure =
CALCULATE(
SUM(Table2[Total]),
Table2[IsNet] = TRUE()
)
+
CALCULATE(
SUM(Table2[Total]),
Table2[Company Code] = 6601
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Helpful_Fun4848
Do you need a measure that gives you the total based on your conditions? IF so, which column should I sum?
For the SupplierCode, hope you will have a slicer in the report.
Please explain
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Yes, I need the sum of Total column based on the conditions.
As for slicer, does filter for suppliercode works as well? Or, does it have to be a slicer?
@Helpful_Fun4848
Create the following measure:
Total Measure =
CALCULATE(
SUM(Table2[Total]),
Table2[IsNet] = TRUE()
)
+
CALCULATE(
SUM(Table2[Total]),
Table2[Company Code] = 6601
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
It looks like it works but I need to double check the result.
Also, want to double check the following. I need to create another measure where the condition is the opposite of the measure that you created. This time, I do not want to include company code 6601 and IsNet = false.
Does the following measure correct?
CALCULATE(
SUM(Table2[Total]),
Table2[IsNET] = FALSE()
)
+
CALCULATE(
SUM(Table2[Total]),
Table2[Company Code] <> 6601
)
@Helpful_Fun4848
Yes, it should work, test and update please.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |