Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I need help with the following. I have the following tables:
1. VAS Table with the following values for columns Date and Subject
2. Sales Table with values for Date and Subject as well.
I want to group the VAS and Sales table by date and then subtract the count. For example:
VAS:
Date Subject
1/21/2019 aaa
1/21/2019 bbb
1/22/2019 ccc
1/22/2019 ddd
1/22/2019 eee
1/22/2019 fff
Sales
Date Subject
1/21/2019 aaa
1/22/2019 bbb
1/22/2019 ccc
I have created a date table with unique dates. I want to add a column in it from the previous two tables with the following:
Date Count
1/21/2019 1 (subtracted from VAS - Sales for that date)
1/22/2019 2 (subtracted from VAS - Sales for that date)
Any help is appreciated!
Thank you!
Neetu
Solved! Go to Solution.
Hi @Anonymous
Try this for the column, where NewTable is the last table you show:
Count = CALCULATE ( COUNT ( VAS[Date] ), FILTER ( VAS, VAS[Date] = NewTable[Date] ) ) - CALCULATE ( COUNT ( Sales[Date] ), FILTER ( Sales, Sales[Date] = NewTable[Date] ))
Hi @Anonymous
Try this for the column, where NewTable is the last table you show:
Count = CALCULATE ( COUNT ( VAS[Date] ), FILTER ( VAS, VAS[Date] = NewTable[Date] ) ) - CALCULATE ( COUNT ( Sales[Date] ), FILTER ( Sales, Sales[Date] = NewTable[Date] ))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |