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.
Hi, I created this measure but when I filter with a slicer by date, it doesn't work properly and Power Bi shows all data:
check_balance =
VAR debit =
SUM(fact_accounting_move_line[debit])
VAR credit =
SUM(fact_accounting_move_line[credit])
VAR conditional =
IF(
ROUND(debit - credit,2) = 0,
"Cuadrado",
"Descuadre"
)
RETURN conditional
The problem is in the conditional because when I try with variables "debit" or "credit" it works correctly. Does anyone know what could be going wrong?
Thank you!!
P.D.: My issue is exactly this: Filter Not working Properly after Applying if cond... - Microsoft Power BI Community
Solved! Go to Solution.
Hi @powerbi2srm ,
In the other issue you mentioned above that was the proposed pattern:
IF (
ISEMPTY ('fact_accounting_move_line'),
BLANK (),
IF(ROUND(debit - credit,2) = 0,"Cuadrado","Descuadre")
)
I understand you have tried out and didn't work.
Please confirm.
Regards,
Hi,
Share the download link of the PBI file and the source Excel file. Share only the fact_accounting_move_line table in that PBI file. Also, is the date format YMD or YDM?
Hi @powerbi2srm ,
In the other issue you mentioned above that was the proposed pattern:
IF (
ISEMPTY ('fact_accounting_move_line'),
BLANK (),
IF(ROUND(debit - credit,2) = 0,"Cuadrado","Descuadre")
)
I understand you have tried out and didn't work.
Please confirm.
Regards,
Anyone can help me? Thank you so much @amitchandak , @Greg_Deckler, @Idrissshatila, @Ashish_Mathur
is move_line_date_id a data column? If not change it to that. If not i don't currently know why it wouldn't work.
Yes, it's of integer type.
@Anonymous I just tried with other tables and I have the same problem. I don't understand.
If this helps please kudo the post. If this gets you the solution please accept this incase anyone else could use this
Are u using Date or integer? U should use Date.
dim_date[date_id] and move_line_date_id are integer type but dim_date is a date table with date columns like formatted_date. With other measures works perfectly so I think that isn't the problem. Anyway thank you for your time.
No problem, sorry i wasn't of any help. Good luck.
There would be the issue i think. Try transforming this to the "Date" I think its spanish u are currently in so it would be "fecha" the function u are using is reading is as a number aka integer. Which is not a Date type.
If this helps please kudo the post. If this gets you the solution please accept this incase anyone else could use this
It could be but move_line_date_id (integer) is related with dim_date[date_id] (integer) and dim_date is a date table. For other measures I don't have this problem. It's just this.
I am personally not an expert but for now could u try a workaround such as creating a new column which is identical to the move_line_date_id as date type just incase this is the issue. If the error persists update the post with your attempts so others can give different advice. If it is not the issue i don't think i can assist further myself.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |