Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi there ;
İ need your quick and small help 🙂
i have a table as below , i need to calculate sum of quantites based on current month for date column
as you see current month October , and i want to create a measure which gives total quantity 180 pcs
Solved! Go to Solution.
Best practices encourage the use of a Date table with continuous dates covering the range of dates in the model as a dimension table. If you create a Date Table, you can use:
Current month =CALCULATE(SUM(table[Qty], FILTER( Date Table, MONTH(Date Table[Date]) = MONTH(TODAY()))
without a date table, you can use:
Current month =CALCULATE(SUM(table[Qty], FILTER( Table, MONTH(Table[Date]) = MONTH(TODAY()))
beware that both these measures filter for the current month number, so disregard the year.
If you need to make it the current month for this year, use:
Current month =CALCULATE(SUM(table[Qty], FILTER( Date Table, MONTH(Date Table[Date]) = MONTH(TODAY())
&& YEAR(Date Table[Date]) = YEAR(TODAY()))
Proud to be a Super User!
Paul on Linkedin.
Best practices encourage the use of a Date table with continuous dates covering the range of dates in the model as a dimension table. If you create a Date Table, you can use:
Current month =CALCULATE(SUM(table[Qty], FILTER( Date Table, MONTH(Date Table[Date]) = MONTH(TODAY()))
without a date table, you can use:
Current month =CALCULATE(SUM(table[Qty], FILTER( Table, MONTH(Table[Date]) = MONTH(TODAY()))
beware that both these measures filter for the current month number, so disregard the year.
If you need to make it the current month for this year, use:
Current month =CALCULATE(SUM(table[Qty], FILTER( Date Table, MONTH(Date Table[Date]) = MONTH(TODAY())
&& YEAR(Date Table[Date]) = YEAR(TODAY()))
Proud to be a Super User!
Paul on Linkedin.
hi @erhan_79 - You can follow the below steps to derive this:
#1 Create a calculated column for Month
Order_Month = Month ( Date )
#2 Create a measure for total quantity
Tot_Qty = Sum ( Qty )
Now if you pull the measure into a table visual and use the Order_Month value as a column then you should see the total quantity by month
Please mark the above comment as a solution to help others find it more quickly. Also please provide a 👍 if my comment helped with solving your issue. Thanks!
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 25 |