Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good day,
I have two tables. Table B is a SQL database, and Table A is a table where the user can insert manual data.
The idea is that once in while the data in the SQL table is wrong, then user can insert the summarized value for a whole month.
(Tables have several tag numbers)
Table A
Date | Tag | value |
31-01-2023 | 1 | 5000 |
31-01-2023 | 2 | 6000 |
28-02-2023 | 2 | 1000 |
Table B
Date | Tag | Value |
02-01-2023 | 1 | 20 |
03-01-2023 | 1 | 30 |
04-01-2023 | 1 | 15 |
05-01-2023 | 1 | 40 |
- | 1 | - |
- | 1 | - |
- | 1 | - |
- | 1 | - |
31-01-2023 | 1 | 25 |
What I want, is to "ignore" values in Table B whenever Table A has a manual input.
I managed with assistance, to use below measure:
PM Consumption =
SUMX (
VALUES ( dim_date[Date]),
COALESCE (
CALCULATE (SUM ( Table A[Value])) ,
CALCULATE ( MAX(Table B[Value]) - MIN( Table B[Value]) )
But this measure only replace the value on the 31-01-2023. I want the measure to "ignore" all data from Table B during january 2023, since there is a manual input in Table A. And only show the summarized value from Table A.
Thanks in advance.
@Anonymous , for that you need have common dimension like date
and then you can have measure like
Sumx(Values(Date[Month Year]), calculate(if(not(Isblank(sum(TableA[Value]))) , sum(TableA[Value]), sum(TableB[Value]))))
Thank you for your reply @amitchandak 🙂
First of all sorry I forgot to mention that I do have a date table.
Your solution partly works. I try to explain in below picture.
I still see data logged from table B when I have data in table A. But the Total is correct.
Hope this makes sense.
TABLE A =
SUM ( Fact_PrevEnergyDataAP[Value] ) / 1000
TABLE B =
( MAX ( Fact_EnergyData[Value] ) - MIN ( Fact_EnergyData[Value] ) ) / 1000
Consumption =
SUMX (
VALUES ( dim_date[Month] ),
CALCULATE ( IF ( NOT ( ISBLANK ( [TABLE A] ) ), [TABLE A], [TABLE B] ) )
)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
64 | |
57 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |