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 am trying to calculate the total for the month based on the below criteria and need some help on how to use the filter
I have 2 fact tables. 1 with the Purchases by the date and another for the receipts in the dock which are in the process of being received. Second table is more of a snapshot. This means 1 PO qty will be part of the snapshots taken on multiple dates.
Based on the selected date, i am trying to total the snapshot table for the totals for the entire month. In the below scenario, if the date selected is 17th Dec, total should look at the snapshot taken on 17th Dec and total quantity for the month. So the expected total will be 75 and exclude Jan quantity
PBIX is attached. https://drive.google.com/file/d/13D_NNJiZXOBB9oMJDyXnBYzS5J6t5jzP/view?usp=sharing
Solved! Go to Solution.
Hi,
In the Purchase snapshot table, i created a calculated column formula
Test = FORMAT(PurchaseSnapshot[Date],"mmyy")=FORMAT(PurchaseSnapshot[Snapshot Date],"mmyy")
Your measure should not be:
On Dock Total = Calculate(sum(PurchaseSnapshot[Quantity]),PurchaseSnapshot[Test]=TRUE())
Hope this helps.
Hi,
In the Purchase snapshot table, i created a calculated column formula
Test = FORMAT(PurchaseSnapshot[Date],"mmyy")=FORMAT(PurchaseSnapshot[Snapshot Date],"mmyy")
Your measure should not be:
On Dock Total = Calculate(sum(PurchaseSnapshot[Quantity]),PurchaseSnapshot[Test]=TRUE())
Hope this helps.
@Pbi07 , Create an independent date table and then try a measure like
//Date1 is independent Date table,
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate(sum(Table[Quantity]), filter(Table, Table[Snapshot_date] =_max && eomonth(Table[Date],0) = eomonth(_max,0) ) )
Tried the measure. But did not work. Calendar is amrked as a date table and relationship set between Date & the date in Snapshot table.
The relation is between calendar [date] & PurchaseSnapshot[SnapshotDate] and the total filtering is on the PurchaseSnapshot[Date] for the beginning to end of the month for selected 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 |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |