Hello everyone,
I need your help. I need to sum amount from journal entries (can't share) if row from journal entry meets criteria from bridge table
but if value in column is empty in bridge table, i don't want to apply filter to journal entries table column (journal entry table may have value in such column which may be in different case used as criteria). Tables are unrelated.
From resulting filtered table i need to sum one column with amount. I tried calculated column, and I can't to power query by myself that well.
Simply it comes down to based on condition in one table how to not filter other table.
Any ideas, please?
Thank you very much in advance,
Solved! Go to Solution.
Hi @v-rzhou-msft
not exactly.
if the first table was
Category | Subcategory | Value |
A | aa | 1 |
A | ab | 2 |
A | 3 | |
B | bb | 4 |
C | cc | 5 |
Values for second table would be:
Category | Subcategory | Result |
AA | 6 | |
AA | aa | 1 |
B | 4 | |
B | bc | 0 |
C | 5 | |
C | cc | 5 |
But I made it work using wildcard "*" as (,,Levely" is table with conditions, DUZ_ALL is table with values)
VAR MDCa = IF(ISBLANK(Levely[MD Category]),"*",Levely[MD Category])
Hi @v-rzhou-msft
not exactly.
if the first table was
Category | Subcategory | Value |
A | aa | 1 |
A | ab | 2 |
A | 3 | |
B | bb | 4 |
C | cc | 5 |
Values for second table would be:
Category | Subcategory | Result |
AA | 6 | |
AA | aa | 1 |
B | 4 | |
B | bc | 0 |
C | 5 | |
C | cc | 5 |
But I made it work using wildcard "*" as (,,Levely" is table with conditions, DUZ_ALL is table with values)
VAR MDCa = IF(ISBLANK(Levely[MD Category]),"*",Levely[MD Category])
Hi @mpetrilaksb
I think you want to calculate sum amount in one table based in another table by filter one column in that table is not blank.
My Sample is as below.
Table:
Table(2):
Try this code.
Measure =
VAR _List = CALCULATETABLE(VALUES('Table (2)'[Category]),FILTER('Table (2)','Table (2)'[Sub]<>BLANK()))
RETURN
SUMX(FILTER('Table','Table'[Category] in _List ),'Table'[Values])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
105 | |
77 | |
72 | |
48 | |
47 |
User | Count |
---|---|
158 | |
86 | |
80 | |
68 | |
66 |