Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
topalych
Frequent Visitor

Formula DAX such as COUNTIF in Excel

Hello! Help me please. 

I need formula DAX.

There is a table:

 

Campaign    Cost     ClientID

First            900        0001

First            900        0002

First            900        0003

Second       1000       0004

Second       1000       0005

Third           300        0006

 

I spent 2200 USD on three campaigns. 900 USD on "First", 1000 USD on "Second" and 300 USD on "Third".

And I got 6 Clients. I want to see how much I spent to get each Client.

 

What should I do to see 300 USD in "First"? Because it repeats 3 times.

The same thing with "Second". There should be 500 USD. Cause I got 2 clients from that Campaign and spent 1000 USD.


In Excel, it is easy to make))

=B2/COUNTIF(A:A;A2)

 

I'll be very appreciate for help!

 

 

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.