Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi Experts,
I would need your help with DAX on achieving my requirements
So I have two scenarios to meet. My data consists of Cost per hour and I have slicers Mfg Code,Dates(Year,Month and Week) on Bar Chart
CostRate : CALCULATE(Sum(cost)/Sum(hours_weekly))
When I select specific Mfg Codes, I should be able to pass correspondent value for hours in the denominator.Something like this and I know I am wrong with this DAX, Just wanted to express what I mean daxically CostRate : If(SelectedValue(MfgCode="H"),CALCULATE(Sum(cost)/Calculate(Sum(hours_weekly),Filter(MfgCode = "H"),If(SelectedValue(MfgCode="L"),CALCULATE(Sum(cost)/Calculate(Sum(hours_weekly),Filter(MfgCode = "L"))
I need to show months(past) and weeks(current months') display of data within Same Chart like this below(excel image)As of now, I have made two charts Months and Weeks separate and used flags to filter only completed period/week
Completed Months = if(FiscalDate[Year]= YEAR(Now()) && FiscalDate[Period]=Month(Now()) && FiscalDate[WeekOfYear] >min(FiscalDate[WeekOfYear]) && FiscalDate[WeekOfYear] <WEEKNUM(Now()),1,0)
Completed Weeks = if(FiscalDate[Year]= YEAR(Now()) && FiscalDate[Period]=Month(Now()) && FiscalDate[WeekOfYear] >min(FiscalDate[WeekOfYear]) && FiscalDate[WeekOfYear] <WEEKNUM(Now()),1,0)Thanks in Advance
ANS
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |