Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
* EDIT: I think I have it but perhaps not working as it should
Both of these return a table with each item and a figure - but the figures are the same for each item per table. I though it should be an averaged figure per type and then a total figure per type. It seems to just give a final figure underneath the table whcih is either averaged or totalled. Is there a way to achieve what I'm looking for? With averaged per item type and total per item type
I'm new. Trying to calculate Total Sum by Product Type.
I've managed it by creating a group in power query, but that resides in a separate table which can't be affected by date slicers etc.
So I'm trying to create a calculated measure to do this. But I keep getting the error can't convert type Text to True/False. This is the code below.
So I've tried another way... but its the same error of course. Can anyone help?
Solved! Go to Solution.
So to give you a potential explanation of what the measure do i'll tell you the following:
the average of 10+12 = 22 meaning average is 22/2 = 11
This is what happens when you use the measure
Thank you , I've tried that and it's working as you've illustrated. I am also now curious how to do the measure as I've edited my question above. Any ideas?
Yo!
The issue is that in your DAX query:
Thanks so much for your clear explanations. So I've included the summary data and I'm getting three different results: I'll show the 3 different measures, including the average measure you've just shown me.
ITEM TYPE | Sales Amount by Item Type |
WINE | €746,498.59 |
BEER | €574,220.53 |
LIQUOR | €802,691.43 |
STR_SUPPLIES | €2,740.88 |
KEGS | €0 |
REF | €663.63 |
DUNNAGE | €0 |
NON-ALCOHOL | €34,084.31 |
1)
2)
3) As suggested in your response:
Each method shows a different result for average, and for the end total.
I'm really confused.
So to give you a potential explanation of what the measure do i'll tell you the following:
the average of 10+12 = 22 meaning average is 22/2 = 11
This is what happens when you use the measure
Thank you Troekoe, much appreciated explanations
Yo!
I am assuming the calculation you are trying to do looks similar to this:
Product type | SUM |
A | 10 |
B | 5 |
C | 20 |
D | 100 |
The nice thing about Power BI is that it calculates a group for you in visuals automatically.
If you were to create a measure = SUM(Your_Table[Sales]) and use this measure with your column: Warehouse_and_Retail_Sales[ITEM TYPE] in a visual.
It will automatically show you the sum for each group.
Look at this example with the data and measure i just told you about:
Hope this helps!
--Troekoe