Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Create a new table like a matrix

Hi.

I'm try to create a new calculated table like this
And fill the blank spaces with "0" to represent in a line chart without blank spaces.

 

The numbers in the matrix is a measure of COUNTROWS and the values of the first column are a column of the Excel with diferent categories.

 

Can you help me please, and sorry for the english errors i'm starting with this.



 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

    I created a sample pbix file (see attachment), please check whether that is what you want.

    1. Create a date dimension table

    2. Create relationship between BD and date dimension table base on date field

    3. Put Month field from date dimension table into matrix to replace month field of BD table

    Best Regards

5 Replies

  • DataZoe's avatar
    DataZoe
    Microsoft Employee

    Anonymous In your measure add in a way to convert the blank() to 0 like this:

     

    Measure = COALESCE(COUNTROWS(Table),0)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Im try to use the solution, but the blank spaces don't fill with values

       

      • PaulDBrown's avatar
        PaulDBrown
        Community Champion

        Anonymous 

        Just add a 0 to your measure.. As in

        no blanks = [your measure] + 0

        or

        no blanks = SUM(table[column]) + 0

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I created a sample pbix file (see attachment), please check whether that is what you want.

    1. Create a date dimension table

    2. Create relationship between BD and date dimension table base on date field

    3. Put Month field from date dimension table into matrix to replace month field of BD table

    Best Regards