The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am doing a quick course on DAX in datacamp... they have created this measure:
Transaction count = Count([FactInternetSale[SalesOrderNumber])
And then using it to do:
Average Transaction = DIVIDE([Total Sales], [Transaction Count])
Why they used Count and not CountDistinct?
This seems wrong... Same SalesOrderNumber might appear 100 times, and Count shall count 100 orders...
Hello @ovonel
They are using count to show the average of each transaction and each transaction has a different ID. In this case, you can use both COUNT and DISTINCTCOUNT. You should use COUNT as this will increase the performance.
no se usa CountDistinct, ya que solo se estaria contando los campos distintos del campo [Transaction Count]),
el promedio se toma de la sumatoria de los datos y se divide en la cantidad de datos. sin importar que sean iguales
Hi, @ovonel
I think, in the FactInternetSales Table, SalesOrderNumber Column is the primary key column. If I am not wrong, the result might be the same.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
17 | |
12 |
User | Count |
---|---|
36 | |
34 | |
20 | |
19 | |
14 |