Forum Discussion

am_i_really's avatar
am_i_really
Frequent Visitor
1 year ago
Solved

Multiple switch commands but multiply value for weight

Hi all,  So I'm trying to replicate the below table with dax:  I am basically counting the total rows but say if I have 3 rows where the score was listed as 80, I need the total number of row...
  • FBergamaschi's avatar
    1 year ago

    Without a more clear explanations and the following things, it is simply impossible to answer your question. 

     

    Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.

     

    Need help uploading data? click here

     

    Want faster answers? click here

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi am_i_really ,

    Thanks for raising this! The concept of applying weights based on scores (e.g., multiply count of rows by a weight factor) is possible in DAX, but as FBergamaschi  rightly pointed out, we need a bit more context to provide you with a solid solution.

    To move forward and help you better, could you please share the following.

    A small sample of your data in a table format just a few rows that demonstrate the issue.
    The expected output for example, what weighted total you'd like to see based on your sample.
    Any specific columns used in your visual (e.g., Score, Weight, Count).

    This will help us suggest the exact DAX measure or calculated column you need. Also, huge thanks to our amazing super users who keep guiding the community with best practices your reminders to structure questions well are always spot on.

    Looking forward to your sample data to help you further.

    Regards,
    Akhil.