Forum Discussion
Get blank() as output
- Anonymous4 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.
I simplified the DB as follow:
| City | Module | Target | Achieved |
| City#1 | Module#1 | 10 | 7 |
| City#1 | Module#2 | 10 | 5 |
| City#1 | Module#3 | 10 | 8 |
| City#1 | Module#4 | 20 | 16 |
| City#1 | Module#5 | 45 | 30 |
| City#2 | Module#1 | 26 | 20 |
| City#2 | Module#2 | 2 | 0 |
| City#2 | Module#3 | 8 | 7 |
| City#2 | Module#5 | 36 | 12 |
the output that I've is as follow.
if i select in the filter City#1, i've the following:
| Module#1 | Module#2 | Module#3 | Module#4 | Module#5 | |
| Target | 10 | 10 | 10 | 20 | 45 |
| Achieved | 7 | 5 | 8 | 16 | 30 |
and if i select the City#2, i've the following:
| Module#1 | Module#2 | Module#3 | Module#4 | Module#5 | |
| Target | 26 | 2 | 8 | Blank() | 36 |
| Achieved | 20 | 0 | 7 | Blank() | 12 |
what i need is that replace that blank() by N/A, please if you could implement this in Power bi desktop and share it with me.
thx
- Pragati114 years ago
Super User