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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
lelorenzi
Frequent Visitor

Count row within criteria combined with different table

I'm breaking my head on doing, and I cant get nowhere.

 

I have two tables only unified by relation where I can relate the offers and person and country:

lelorenzi_0-1715767623185.png

 

And I want to do a distinct count of how many offers where above the target value, and then group the results by country:

lelorenzi_1-1715767673425.png

 

I've tried the following measure:

 

CALCULATE
(DISTINCTCOUNT('Events'[Offer]),
'Events'[Offer] > SUM('Events'[Target]))

 

 

It works when I'm visualizing a table with the PersonID rows, but it doesnt work when I change to the grouped by country view.

Thanks!

1 REPLY 1
miTutorials
Super User
Super User

I dont see any relationships between these tables.. You will have to first create relationships for the measure to work!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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