Forum Discussion

Zakaria_1980's avatar
Zakaria_1980
Icon for Post Patron rankPost Patron
4 years ago
Solved

Get blank() as output

Hi,   I've DB with Target for each module and how many achieved per City. so when I want to get the gap for each Module and per city, if in the DB in one of the cities, one of the modules was not f...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Zakaria_1980 ,

     

    It looks like a matrix. But you chose a card visual, which is puzzling.

     

    You can use the matrix visual to show the same effect.

     

     

     

    Here's the solution.

    1.Does your data model only have one table?

    If it is, use dax to create a Module table.

    Table 2 = DISTINCT('Table'[Module])

     

    2.Relationship is as follows.

     

    3.Create two measures.

    Target value = 
    var _sum=SUM('Table'[Target])
    return
    IF(ISBLANK(_sum),"N/A",_sum)
    Acieved value = 
    var _sum=SUM('Table'[Achieved])
    return
    IF(ISBLANK(_sum),"N/A",_sum)

     

    Then we get the results.

     

    Check the attachment for more details.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.