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.
I have the following code, which sums up all my fees for my clients.
SumAmtVar = SUMX ( FILTER ( _billings, _billings[_tsg_clientid_value] = accounts[accountid] ), __billings[Amount] )
What I am needing is an additional filter that filters my transaction dates for the current month or a hard coded date range. What would the second filter look like? Any help or assistance is greatly appreciated.
Solved! Go to Solution.
Hi @Anonymous,
Isn't MONTH ( _billings[Date] ) = MONTH ( TODAY () ) the August 1, 2018 to August 31, 2018? If you want a more dynamic method, it could be like below.
SumAmtVar = CALCULATE ( SUMX ( FILTER ( _billings, _billings[_tsg_clientid_value] = accounts[accountid] ), __billings[Amount] ), FILTER ( _billings, _billings[Date] >= DATE ( 2018, 8, 1 ) && _billings[Date] <= DATE ( 2018, 8, 31 ) ) )
Best Regards,
Dale
Hi @Anonymous,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi @Anonymous,
How does your data look like? It could be like below.
SumAmtVar = SUMX ( FILTER ( _billings, _billings[_tsg_clientid_value] = accounts[accountid] && MONTH ( _billings[Date] ) = MONTH ( TODAY () ) ), __billings[Amount] )
or
SumAmtVar = CALCULATE ( SUMX ( FILTER ( _billings, _billings[_tsg_clientid_value] = accounts[accountid] ), __billings[Amount] ), FILTER ( _billings, MONTH ( _billings[Date] ) = MONTH ( TODAY () ) ) )
Best Regards,
Dale
I am looking to do a filter between dates, for example August. I need a filter the _billings[Date] as August 1, 2018 through August 31, 2018. How do I ceate a between date range filter?
Hi @Anonymous,
Isn't MONTH ( _billings[Date] ) = MONTH ( TODAY () ) the August 1, 2018 to August 31, 2018? If you want a more dynamic method, it could be like below.
SumAmtVar = CALCULATE ( SUMX ( FILTER ( _billings, _billings[_tsg_clientid_value] = accounts[accountid] ), __billings[Amount] ), FILTER ( _billings, _billings[Date] >= DATE ( 2018, 8, 1 ) && _billings[Date] <= DATE ( 2018, 8, 31 ) ) )
Best Regards,
Dale
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |