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 new at Power BI and i want to create a report so, Im still new with syntax the point is:
I have a 2 columns one of them is Product and the other one is the Quantity , so i need to find out the Sum of Quantites for a specific product, i did that in Qlik Sense the and syntax was like this :
Num(sum({$ <Product={Cores}>} Quantity),'#.##0,00',',','.')
how to convert it to Power BI
Thnx
Solved! Go to Solution.
@Nahel88 on a more general note, while I do not think that you need a formula in this case, as @ankitpatira says, I assume that at some point you will. The function reference for DAX is here:
https://msdn.microsoft.com/en-us/library/ee634396.aspx
The function reference for Power Query "M" is here:
https://msdn.microsoft.com/en-us/library/mt211003.aspx
In DAX, your formula below would be something like this in a measure:
Sum of Quantities = SUM([Quantities])
But, as @ankitpatira states the visualizations sort of do that automagically.
@Nahel88 on a more general note, while I do not think that you need a formula in this case, as @ankitpatira says, I assume that at some point you will. The function reference for DAX is here:
https://msdn.microsoft.com/en-us/library/ee634396.aspx
The function reference for Power Query "M" is here:
https://msdn.microsoft.com/en-us/library/mt211003.aspx
In DAX, your formula below would be something like this in a measure:
Sum of Quantities = SUM([Quantities])
But, as @ankitpatira states the visualizations sort of do that automagically.
@Nahel88 In power bi desktop you don't need to write code to be able to do that. You can choose any visual say for example column chart and you need to drop Quantity field in Value area and Product field in Axis area. This will automatically give you sum of quantities by product. For a specific product you can use filter or slicer. You also have option to specify count, sum or other aggregations for Quantiy column.
well in some how i did it :
Cores = CALCULATE(SUM('test'[Quantity]);'test'[Product]= "Cores")
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 |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |