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.
Hi,
I have the below SQL from which I want to create a column to get the total Collection data for that particular month.
How can I create a DAX calculated column.
select companyid,DATEFROMPARTS(receivedyear,receivedmonth,1) ReceivedMonth,sum(amount) Collection
From CashReceiveds where companyid=280
group by companyid,DATEFROMPARTS(receivedyear,receivedmonth,1)
Expected Output:
companyid | ReceivedMonth | Collection |
280 | 01-01-2019 | 51823.02 |
280 | 01-12-2019 | 500 |
280 | 01-01-2020 | 90650.48 |
280 | 01-02-2020 | 45903.93 |
Solved! Go to Solution.
Hi @Anonymous
If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!
If not, please kindly elaborate more.
Hi @Anonymous
If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!
If not, please kindly elaborate more.
@Anonymous No idea about the SQL usually not best path to victory. Sample data is better, but maybe:
New Table = SUMMARIZE('Table',[companyid],[received month],"Collection",SUM([Collection]))
Or if you want a column? Hard to tell, no sample data:
Column = SUMX(FILTER('Table',[companyid]=EARLIER([companyid])&&[received month]=EARLIER([received month])),[Collections])
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |