The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hey,
i have a problem with my measure. I try to use Countrows on a table based on two columns in a related table.
I have a table "Receipts" (Many-side) and a table "Customers" (One-side) and they are in a Many-to-One relationship. So each receipt record has a column with a CustomerNo that has one record in my table Customer. Now I want to calculate the numer of receipts that meet the criteria of two columns in the related customer table.
For example I calculate the number of receipts that possess a customer number which has a address line like that:
Solved! Go to Solution.
@PowerFabian , Try a meausre like
Number with any phonenumber = CALCULATE(COUNTROWS(Fact_Belege), filter(Dim_Customer,not(isblank(Dim_Customer[FonPrivate1])) || not(isblank(Dim_Customer[MobileFonPrivate]))))
Yes, known thing for CALCULATE as it's implicitly using FILTER which pulls logic values from one column: for solutions refer to this: https://www.sqlbi.com/articles/filter-arguments-in-calculate/
@PowerFabian , Try a meausre like
Number with any phonenumber = CALCULATE(COUNTROWS(Fact_Belege), filter(Dim_Customer,not(isblank(Dim_Customer[FonPrivate1])) || not(isblank(Dim_Customer[MobileFonPrivate]))))
Thank you very much for your help. It worked like that for me.
Regards,
Fabian
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |