Forum Discussion
lingvistt
7 years agoFrequent Visitor
New measure while modeling shows blank rows
Hi all, I have a table with activities of customers, profit and cost for each activity. Based on 'Table 1' I calculated new measure 'ROI'='Profit'/'Cost'. Then I want to group activities using a...
- 7 years ago
HI lingvistt
Try the Measure below.
Measure = VAR _div = DIVIDE( SUM( 'Table'[Profit] ), SUM( 'Table'[Cost] ) ) RETURN IF( NOT ISBLANK( _div ), _div + 1 )
Hope this helps!
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
Mariusz
Community Champion
7 years agoHi lingvistt
Please can you create a sample data and provide the DAX expressions that you are currently using?
lingvistt
7 years agoFrequent Visitor
Here is the sample Data. The DAX expression: ROI = SUM(Table1[Profit])/SUM(Table1[Cost])+1
When I was creating sample, I got the root for the problem: in formula I use '+1' (the logic is if ROI>100%, than it's fine). If I eliminate '+1', it works perfectly, but in this case I do not get what I want.
P.S. I wanted to attach sample or pbix, but I think it is not permitted to do it here. Only photos.
- Mariusz7 years ago
Community Champion
HI lingvistt
Try the Measure below.
Measure = VAR _div = DIVIDE( SUM( 'Table'[Profit] ), SUM( 'Table'[Cost] ) ) RETURN IF( NOT ISBLANK( _div ), _div + 1 )
Hope this helps!
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.