Forum Discussion
vpnnm
7 years agoFrequent Visitor
Help for calculating multiple fields of multiple table in many to many relationship!
Dear All,
Please help me with the situation as below:
Produce the table as below, however my measure for Total #APP looks wrong, and i spent many day searching without possible solution:
Result
Date Slide from the DISB table.
CMP_NM column from the LEADGEN table
My Dax code as follow:
Total #APP = CALCULATE(DISTINCTCOUNT(APP[APP_ID_C]),LEADGEN[REALNM_NO]<>BLANK())
Total #DISB = CALCULATE(DISTINCTCOUNT(DISB[agreementid]),LEADGEN[REALNM_NO]<>BLANK())
Total #LEAD = CALCULATE(COUNT(LEADGEN[CUST_NO]),ALLEXCEPT(LEADGEN,LEADGEN[CMP_NM]))
Your help are greatly appreciated.
Thank you so much,
Hi vpnnm,
Try this one, please. Are you sure the result should be 2901? I would suggest you check them with a small dataset.
Total #APP = CALCULATE ( DISTINCTCOUNT ( APP[APP_ID_C] ), FILTER ( BRIDGE, BRIDGE[ID] <> BLANK () ), FILTER ( LEADGEN, LEADGEN[REALNM_NO] <> BLANK () ) )
Best Regards,
16 Replies
- vpnnmFrequent VisitorPlease help or point me to some dỉection so i can figure it out. Tks