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.
This should seem simple but I can't wrap my head around it.
I have a table with item quantities compared to the 6 Month Usage. The Qty is either less that the 6 month usage or greater than it.
It also includes the associated extended cost.
There are times where there is both a qty less than the 6 Month Usage AND more than the 6 Month Usage.
I'm trying to produce a summary table like the one below the detail data below.
It has 2 categories, On Hand > 6 months and On Hand < 6 months with totals for Quantity and Cost.
Any help would be greatly appreciated!
Solved! Go to Solution.
Hi @clarkpaul ,
I would do the folllowing:
Category ID
On Hand > 6 Month | 1 |
On Hand <= 6 Month |
2 |
Cost = SWITCH(
SELECTEDVALUE(Category[ID]);
1 ; SUM('Table'[On Hand > 6 Months Usage Cost]);
2 ; SUM('Table'[On Hand <= 6 Month Usage Cost]);
SUM('Table'[On Hand <= 6 Month Usage Cost]) + SUM('Table'[On Hand > 6 Months Usage Cost])
)
Quantity = SWITCH(
SELECTEDVALUE(Category[ID]);
1 ; SUM('Table'[On Hand > 6 Month Qty]);
2 ; SUM('Table'[On Hand <= 6 Mnoth Qty]);
SUM('Table'[Qty])
)
See result in attach PBIX file .
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @clarkpaul ,
I would do the folllowing:
Category ID
On Hand > 6 Month | 1 |
On Hand <= 6 Month |
2 |
Cost = SWITCH(
SELECTEDVALUE(Category[ID]);
1 ; SUM('Table'[On Hand > 6 Months Usage Cost]);
2 ; SUM('Table'[On Hand <= 6 Month Usage Cost]);
SUM('Table'[On Hand <= 6 Month Usage Cost]) + SUM('Table'[On Hand > 6 Months Usage Cost])
)
Quantity = SWITCH(
SELECTEDVALUE(Category[ID]);
1 ; SUM('Table'[On Hand > 6 Month Qty]);
2 ; SUM('Table'[On Hand <= 6 Mnoth Qty]);
SUM('Table'[Qty])
)
See result in attach PBIX file .
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@clarkpaul , Summarize can help.
example, the way two get 2nd from first
union(
summarize(Table, "Category", "On Hand > 6 months", "Quantity",[On Hand Qty > 6 Month], "Cost",[On Hand Qty > 6 usage Cost]),
summarize(Table, "Category", "On Hand <= 6 months", "Quantity",[On Hand Qty <= 6 Month], "Cost",[On Hand Qty <= 6 usage Cost])
)
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |