Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi, I'm a beginner in Power BI, and I have a table like this:
I need a calculated column, with the total distinct values of 'Talle' column, if value in existencia is equal to 1. In the image above, the result should be 8, because there are 9 unique different values, but only 8 have 1 in 'Existencia' ( Talle= 3 , has Existencia=0). It' important to consider that , the same must be done for each Parent Item. Maybe in another Parent Id values, I could have the same values in 'Talle' Column. How could it be done? . Thanks in advance!!!
Solved! Go to Solution.
@Anonymous , Try like
calculate(distinctCOUNT(Table[Talle]), filter(Table, Table[existencia] =1))
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Distinct count of Talle CC =
COUNTROWS (
SUMMARIZE (
FILTER (
Data,
Data[Existencia] = 1
&& Data[Parent_Item] = EARLIER ( Data[Parent_Item] )
),
Data[Talle]
)
)
You are using DAX, not Power Query Formula Language. See Create calculated columns for more information.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Distinct count of Talle CC =
COUNTROWS (
SUMMARIZE (
FILTER (
Data,
Data[Existencia] = 1
&& Data[Parent_Item] = EARLIER ( Data[Parent_Item] )
),
Data[Talle]
)
)
@Anonymous , try to create as a measure
new column as
calculate(distinctCOUNT(Table[Talle]), filter(Table, Table[existencia] =1 && [Parent_Item] = earlier([Parent_Item] ) ))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 47 | |
| 43 | |
| 39 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 31 | |
| 27 | |
| 24 |