The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
---|---|
15 | |
13 | |
7 | |
6 | |
5 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |