Forum Discussion

MeggieD00dles's avatar
MeggieD00dles
Frequent Visitor
1 year ago
Solved

How do I create a table of descriptive stats from numerous data sources?

I can't seem to find an answer that works for me, so looking to you all for help.

 

In my PBI report I have numerous data sources (in the example file, each "example table" is a separate data source in the report) and I want to create a way to build a table or matrix visual that displays the distinct count of [record_id] and the descriptive stats of [value] for each data source.

 

I want to make a table that outputs the following based on the example file 

 Table 1Table 2Table 3
Count of Records633
Min111
Max377
Mean245
Median245
Mode277
Standard Dev.0.822.031.95

 

Any help would be greatly appreciated!

  • Hi... to get this stats for each table, you can use this function in Power Query: 

    let
    Source = Table.Profile(#"YourTableName")
    in
    Source

     

    This will create a table, where each column of your table will be represented by single row and information about Min, Max, StandardDeviation, Average, Count, NullCount and DistinctCount will be provided. On top of it, you can create some or your own measures, e.g. completness, etc.... but is missing Mean, Mode and Median

     



    You can do it for all tables, add new column with table name and then append them to a final single table ๐Ÿ˜‰

    I hope this helps ๐Ÿ™‚

     

4 Replies

  • Hi... to get this stats for each table, you can use this function in Power Query: 

    let
    Source = Table.Profile(#"YourTableName")
    in
    Source

     

    This will create a table, where each column of your table will be represented by single row and information about Min, Max, StandardDeviation, Average, Count, NullCount and DistinctCount will be provided. On top of it, you can create some or your own measures, e.g. completness, etc.... but is missing Mean, Mode and Median

     



    You can do it for all tables, add new column with table name and then append them to a final single table ๐Ÿ˜‰

    I hope this helps ๐Ÿ™‚

     

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      Or the DAX equivalent COLUMNSTATISTICS()

  • v-lgarikapat's avatar
    v-lgarikapat
    Icon for Community Support rankCommunity Support

    Hi MeggieD00dles ,

    Thanks for reaching out to the Microsoft fabric community forum.

    lbendlin , ivana_tomekova Thanks for the prompt response

    MeggieD00dles 

    I wanted to follow up and confirm whether youโ€™ve had the opportunity to review the information  provided by lbendlin , ivana_tomekova  If you have any questions or need further clarification, please donโ€™t hesitate to reach out.

     

    We appreciate your collaboration and support!

    Best regards,
    Lakshmi.

    • v-lgarikapat's avatar
      v-lgarikapat
      Icon for Community Support rankCommunity Support

      Hi MeggieD00dles ,

       

      Weโ€™d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please donโ€™t hesitate to reach out. Weโ€™re more than happy to continue supporting you.

      We appreciate your engagement and thank you for being an active part of the community.


      Best Regards,
      Lakshmi.