Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have two tables . Target and Sales Table. I want to show sales for c and d as well with 0 sales and their respective targets.
Product | Target |
A | 50 |
B | 25 |
C | 30 |
D | 10 |
Sales Date | Product | Sales |
2/1/2018 | A | 2 |
2/2/2018 | B | 4 |
2/3/2018 | A | 1 |
2/4/2018 | B | 5 |
2/5/2018 | A | 7 |
2/6/2018 | B | 5 |
2/7/2018 | A | 2 |
2/8/2018 | B | 4 |
2/9/2018 | A | 1 |
2/10/2018 | B | 1 |
2/11/2018 | A | 3 |
2/12/2018 | B | 2 |
2/13/2018 | A | 3 |
2/14/2018 | B | 2 |
2/15/2018 | A | 3 |
2/16/2018 | B | 1 |
2/17/2018 | A | 2 |
2/18/2018 | B | 1 |
Desired Result :
Product | Sales | Target |
A | 24 | 50 |
B | 25 | 25 |
C | 0 | 30 |
D | 0 | 10 |
Solved! Go to Solution.
Hi @moses07_ferns ,
Depending on the information you have provided, you can add a new measure:
SALES_ =
VAR _PRODUCT =
SELECTEDVALUE ( 'Sales Table'[Product ] )
VAR _RESULT =
CALCULATE (
SUM ( 'Sales Table'[Sales] ),
FILTER ( 'Sales Table', 'Sales Table'[Product ] = _PRODUCT )
)
RETURN
IF ( _RESULT > 0, _RESULT, 0 )
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @moses07_ferns ,
Depending on the information you have provided, you can add a new measure:
SALES_ =
VAR _PRODUCT =
SELECTEDVALUE ( 'Sales Table'[Product ] )
VAR _RESULT =
CALCULATE (
SUM ( 'Sales Table'[Sales] ),
FILTER ( 'Sales Table', 'Sales Table'[Product ] = _PRODUCT )
)
RETURN
IF ( _RESULT > 0, _RESULT, 0 )
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |