Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to calculate total usage based on a timeline slicer that uses invoice date from a sales table.
The sales table and recipe table are unrelated and cannot be related due to multiple values per each column.
I cannot figure out how to haev teh calculated column take into account the timelin slicer from teh invoice table.
Total Usage= var currentProduct='RC_FULL_LEVEL_RECIPES'[Part_0] Var currentwarehouse=RC_FULL_LEVEL_RECIPES[Warehouse_0] Var MinDate=CALCULATE(MIN(RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Date])) Var Maxdate=CALCULATE(MAX(RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Date])) Return IF(RC_FULL_LEVEL_RECIPES[RawQtyUsed]=1,CALCULATE(SUM(RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Qty]),FILTER(ALL(RC_Daily_Sales_Report_Invoice_Line_Detail[Warehouse]),RC_Daily_Sales_Report_Invoice_Line_Detail[Warehouse]=currentwarehouse),FILTER(ALL(RC_Daily_Sales_Report_Invoice_Line_Detail[PART_CODE]),RC_Daily_Sales_Report_Invoice_Line_Detail[PART_CODE]=currentProduct))*RC_FULL_LEVEL_RECIPES[RawQtyUsed],CALCULATE(SUM(RC_Daily_Sales_Report_Invoice_Line_Detail[Weight]),FILTER(ALL(RC_Daily_Sales_Report_Invoice_Line_Detail[Warehouse]),RC_Daily_Sales_Report_Invoice_Line_Detail[Warehouse]=currentwarehouse),FILTER(ALL(RC_Daily_Sales_Report_Invoice_Line_Detail[PART_CODE]),RC_Daily_Sales_Report_Invoice_Line_Detail[PART_CODE]=currentProduct),FILTER(ALL(RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Date]),RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Date]>=MinDate),FILTER(ALL(RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Date]),RC_Daily_Sales_Report_Invoice_Line_Detail[Invoice_Date]<=Maxdate))*RC_FULL_LEVEL_RECIPES[RawQtyUsed])
Solved! Go to Solution.
I think I solve my issue on this one. Date slicers can't be used for a calculated column. On to a new problem having to do with weighted averages. I will post in a seperate thread.
it might be more helpful if you post a short sample of the data itself with column names
with a statement of what calculation you seek
I think I solve my issue on this one. Date slicers can't be used for a calculated column. On to a new problem having to do with weighted averages. I will post in a seperate thread.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
39 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |