Forum Discussion
BrentHamm
5 years agoNew Member
Creating a Summary table from two fact tables
I am struggling with the dax to create a summary table (in red box) from a purchase and invoice table as shown below. The data needs to be in this format for the venn digram to function. I also ...
- 5 years ago
try something like this:
summary table = SUMMARIZE(Accounts,Accounts[ID],"HasInvoice",IF(CALCULATE(COUNT(Invoices[Invoice ID]))>0,1,0),"haspurchase",IF((CALCULATE(COUNT(Purchases[Purchase ID])))>0,1,0))then add a column as follow for the counter on the new table:counter = if(and(summary table[ hasinvoice]=1,summary table[haspurchase]=1),1,0)if this helped solve your question please masrk as solution, and if if like the solution give kudos 🙂
StefanoGrimaldi
5 years agoResident Rockstar
try something like this:
summary table = SUMMARIZE(Accounts,Accounts[ID],"HasInvoice",IF(CALCULATE(COUNT(Invoices[Invoice ID]))>0,1,0),"haspurchase",IF((CALCULATE(COUNT(Purchases[Purchase ID])))>0,1,0))
then add a column as follow for the counter on the new table:
counter = if(and(summary table[ hasinvoice]=1,summary table[haspurchase]=1),1,0)
if this helped solve your question please masrk as solution, and if if like the solution give kudos 🙂
BrentHamm
5 years agoNew Member
That is exactly what i wanted, and i was close. Thanks so much!!