To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
hi, @mmunozi1984
i think there are some confusion
let's break your code and try to know what output is
so
it give you a table which contain 8 rows (distinct value of NombreCategoria)
and count of related rows from table Detalles de pedidos.
these same answer given by my formula
in below code
an you try to count rows of above table(in above image)
which contain 8 distinct rows of NombreCategoria (not rows present in table Detalles de pedidos)
so it give 1 value in NombreCategoria and total 8 (because 8 rows present in above table).
you use [Pedidos] > 0 but no value(count) below zero
I hope you clear what i want to say
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to give kudos.
Hi, @mmunozi1984
i hope you understand what i try to explain
and now your desired output is below
download .pbix file HERE
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to give kudos.
I realized my mistake, your solution is correct.
hi, @mmunozi1984
try below
result = calculate(countrows('detalles de pedidos'), relatedtable('detalles de pedidos'))
I appreciate your efforts to assist me. However, it seems that it’s not functioning as expected. I’m aware that the total order amounts to 830. Therefore, the value of each category should be less than this figure. I show that the delivered measure turns out . I appreciate any help in advance.
My model data
https://drive.google.com/file/d/1tnZvCo8tAebXt7Zqgg0oPL7oLbGTMbnS/view?usp=share_link
hi, @mmunozi1984
i think there are some confusion
let's break your code and try to know what output is
so
it give you a table which contain 8 rows (distinct value of NombreCategoria)
and count of related rows from table Detalles de pedidos.
these same answer given by my formula
in below code
an you try to count rows of above table(in above image)
which contain 8 distinct rows of NombreCategoria (not rows present in table Detalles de pedidos)
so it give 1 value in NombreCategoria and total 8 (because 8 rows present in above table).
you use [Pedidos] > 0 but no value(count) below zero
I hope you clear what i want to say
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to give kudos.
Hi, @mmunozi1984
i hope you understand what i try to explain
and now your desired output is below
download .pbix file HERE
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to give kudos.
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |