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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ChrisSschmucekr
Regular Visitor

Counting rows whit two filters in a Time Period

Hallo

 

My goal is to show in a timeline how many persons who are active in a given time period (month) (one source of data) AND have received payments (another source of data).

 

I manage to calculate the active persons in the time period by using:

Active = CALCULATE(COUNTROWS('Kontaktforløb'); FILTER('Kontaktforløb'; ('Kontaktforløb'[Første hele måned] <= LASTDATE(Kalender[Datekey]) && 'Kontaktforløb'[Sidste hele måned]>= FIRSTDATE(Kalender[Datekey]))))

 

From here.

  

Result:

 graf.jpg

 

But how can I put on an extra filter from a another tabel?

 

My humble guess (not working):

Active with payment = CALCULATE(COUNTROWS('Kontaktforløb');FILTER('Kontaktforløb'; ('Kontaktforløb'[Første hele måned] <= LASTDATE(Kalender[Datekey]) && 'Kontaktforløb'[Sidste hele måned]>= FIRSTDATE(Kalender[Datekey]))) && LOOKUPVALUE('DREAM-Branche'[Branche];'DREAM-Branche'[FørsteIMåneden];'Kontaktforløb'[Første hele måned];'DREAM-Branche'[cpr_nr];'Kontaktforløb'[CPR FORMAT])<>BLANK())

 

1 REPLY 1
bsas
Post Patron
Post Patron

Hi @ChrisSschmucekr,

 

You can try to create measure or create relationship beetween these tables.

 

In second case: 1 - create slicer like: "payment received - yes, no".

                          2 - use visual/report level filter and there indicate people who received payments.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.