Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I am pulling values from Table_2 in Table_1 with a realtionship. But there are some missing values in Table_2 which shows blank values in my Table_1. Instead of blank, I want to hard code a number eg - '8' or '0' whenever there is a missing match.
Table_1
User |
A |
B |
C |
D |
E |
F |
Table_2
User | count |
A | 1 |
C | 5 |
E | 4 |
Expected output (Hardcoding '8' in this example)
User | Count |
A | 1 |
B | 8 |
C | 5 |
D | 8 |
E | 4 |
F | 8 |
Thanks in advance.
Solved! Go to Solution.
You can substitute something else for blanks like this:
Count =
VAR _Count = SUM ( Table_2[count] )
RETURN
IF ( ISBLANK ( _Count ), 8, _Count )
Ignore this for now as I have found a workaround for it (By creating a new table with unique values).
Thanks for your help!
Hi Alexis,
This work well with some minor changes. But it always shows all the vales even after I apply a filter. Is there a way to filter values with the respective filters.
For example - If I add a new column with user attributes, like age group and I filter on that, it still shows all the values.
It can be tricky since you have to specify which non-existing values you do and don't want to replace (how do you tell which blanks are which?). Can you give a specific example of what you're getting versus what you expect to get?
You can substitute something else for blanks like this:
Count =
VAR _Count = SUM ( Table_2[count] )
RETURN
IF ( ISBLANK ( _Count ), 8, _Count )
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
21 | |
20 | |
19 | |
13 | |
12 |
User | Count |
---|---|
41 | |
29 | |
23 | |
22 | |
22 |