The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
I have the following tables:
What I would like to do is show a percentage graph of how many leads have been created against the targets for each main category. By creating the adequate relationships between the four tables I have been able to show progess in absolute numbers (above) using a line and stacked column chart, but given the targets for each main category differ so much that gives less insight into the smaller categories
One solution I have in mind is having a calculated column in the Targets table to "Countif" the rows in the first table against their main category which appears in the Targets table, and having a second calculated column to look at the percentage. It's the first calculated column (the countif equivalent) that I'm having trouble with
Any suggestions? Thanks very much
Solved! Go to Solution.
Hi AA,
You can try this formula.
Measure 2 = DIVIDE ( COUNT ( 'pd_nb_leads'[id] ), SUM ( Targets[target] ), 0 )
Best Regards!
Dale
Hi @AbbasAsaria90,
Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.
Best Regards!
Dale
Ah sorry about that - thanks it worked great!
Best,
AA
Hi AA,
You can try this formula.
Measure 2 = DIVIDE ( COUNT ( 'pd_nb_leads'[id] ), SUM ( Targets[target] ), 0 )
Best Regards!
Dale
The general equivalent for COUNTIF is CALCULATE with a filter. In your case you would likely have to use a RELATED or RELATEDTABLE as part of your FILTER clause in your CALCULATE. Tough to be specific without sample data.
Thanks for your help!
I've shared the pbix file here (https://www.dropbox.com/s/42sa3rwlrvxtyzy/170831%20sample%20leads%20file.pbix?dl=0) - if that helps
Best,
AA
Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.
User | Count |
---|---|
158 | |
109 | |
96 | |
83 | |
75 |
User | Count |
---|---|
154 | |
137 | |
131 | |
81 | |
62 |