The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello everyone,
If you could kindly help me figure our how to fix my problem, I would greatly appreaciate it!
What I'm trying to do is this:
I have 4 columns Date, Calls, Sales, %.
The % column is just Sales Divided by Calls. I'm managed to do this calculation on Power Bi for the sheet in the data section, so I would get results that look like this:
What I need to do now, is to create 3 graphs, one for the total calls divided per day, one for the total sales divided per day and one for the total % divided per day. The Calls and Sales graphs I managed to do with no issue as the system only sums every value for a single column for each day. But for the % graph instead of this:
I'm also getting the sum of each % value for the day:
What I needed was that the resulting value would be the result between all sales of a day, divided by all calls of that day.
I've searched for topics regarding this issue, but couldn't find it. Please let me know if anyone has already explained the solution.
Best regards to all and thanks in advance for your time!
Solved! Go to Solution.
Hi @BruCe05
Please create a measure instead of a calculated column. This is more recommendable.
Percent = DIVIDE(SUM('Table'[sales]),SUM('Table'[calls]))
If you want to have it in a calculated column, try below DAX
% = DIVIDE(CALCULATE(SUM('Table'[sales]),ALLEXCEPT('Table','Table'[Date])),CALCULATE(SUM('Table'[calls]),ALLEXCEPT('Table','Table'[Date])))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@BruCe05 , You have two option
% = Divide(sum(Table[Call]), Sum(Table[Sales]))
or
% 1 = sumx(values(table[Day]), Divide(sum(Table[Call]), Sum(Table[Sales])) )
Hi @amitchandak thank you for your message!
Sadly it didn't work. For both solutions, all lines in the calculated column returns the same value.
I hoped that it was just a displaying option for the graph, but from your reply I assumed it will need to be a differente formula, right? In this case is maybe an equivalent to Excel's sumifs possible? What do you think?
Hi @BruCe05
Please create a measure instead of a calculated column. This is more recommendable.
Percent = DIVIDE(SUM('Table'[sales]),SUM('Table'[calls]))
If you want to have it in a calculated column, try below DAX
% = DIVIDE(CALCULATE(SUM('Table'[sales]),ALLEXCEPT('Table','Table'[Date])),CALCULATE(SUM('Table'[calls]),ALLEXCEPT('Table','Table'[Date])))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
182 | |
81 | |
64 | |
46 | |
38 |