Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I need to create a Cumulative Distribution Plot in Power BI without knowing the number of rows the data contains. I followed the steps in this tutorial https://www.youtube.com/watch?v=oyo8OwTMM38&t=312s, but he knows that his data contains 5000 rows. How can I add a "Frequency" column that contains Index/length(Index)?
Solved! Go to Solution.
Hi @Anonymous ,
In dax you can use countrows(table) to get the rows number in your table. then you can creat a calculated column:
Frequency = Table[index]/COUNTROWS(Table)
In power query you can use the following :
= Table.AddColumn(last step name,
"Frequency",
each [Index]/Table.RowCount(last step name)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Anonymous ,
In dax you can use countrows(table) to get the rows number in your table. then you can creat a calculated column:
Frequency = Table[index]/COUNTROWS(Table)
In power query you can use the following :
= Table.AddColumn(last step name,
"Frequency",
each [Index]/Table.RowCount(last step name)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
In Power Query , List.Max(#"Added Index"[Index]) will give you the number of rows. #"Added Index" is the name of the previous step