Forum Discussion
Anonymous
4 years agoNot applicable
Filtering a line chart
Hi Everyone, I’m just starting with Power BI and have a problem with a line chart that I hope someone will be able to help with. The chart shows Sales Margin by Employee/Month and is filtered by...
- 4 years ago
Hi Anonymous ,
Try this:Margin = IF( ISBLANK( CALCULATE( [Profit]/SUM('Job Ledger'[Total Price]) , ALLSELECTED('Calendar'[Date])), BLANK(), IF( ISBLANK( [Profit]/SUM('Job Ledger'[Total Price])), 0, [Profit]/SUM('Job Ledger'[Total Price])))
Let me know how it goes!
Br,
J
tex628
4 years agoCommunity Champion
Hi Anonymous ,
Try this:
Margin =
IF(
ISBLANK( CALCULATE( [Profit]/SUM('Job Ledger'[Total Price]) , ALLSELECTED('Calendar'[Date])), BLANK(),
IF(
ISBLANK( [Profit]/SUM('Job Ledger'[Total Price])),
0,
[Profit]/SUM('Job Ledger'[Total Price])))
Let me know how it goes!
Br,
J
Anonymous
4 years agoNot applicable
Hi
Thanks so much. Works perfectly and a valuable lesson for me.
Best regards