The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I am having troubles with a chart if I try to add a title with conditional formating (from a measure).
It says "Can't display the visual" - Query (156,12) Each table argument of 'UNION' must have the same number of columns.
Also, the "General" ribbon inside the "Format your Visual" disappears and it's not longer possible to remove the title. The only way is to undo the last action.
Here are some details of the chart used:
Chart used: Line and stacked column chart
X-axis: Table3[ColumnH] -> Option "Show items with no data" is activated
Column y-axis: Table1[Measure1] (with Measure1= SUM('Table1'[ColumnM])
Line y-axis: Table1[Measure2] (with Measure2= CALCULATE([Mes2], ALL('Table2'[ColumnA]), 'Table2'[ColumnA]="ABCD", 'Table1'[ColumnY]="XYZ", ALL(Table1[ColumnZ])))
Column legend : Table1[ColumnZ]
Title : Table1 > Measure > Title = "Title defined via measure"
IMPORTANT DETAIL: if I remove the option "Show Items with no data", the chart is working properly.
Ps: I tried to change the relationships between the 3 tables used but nothing changes.
Thank you for your help.
Best regards,
Thibaut
The error message “Each table argument of ‘UNION’ must have the same number of columns” suggests that there might be an issue with the DAX expression used in your measure for the title.
Ensure that all tables used in the function have the same number of columns and compatible data types.
The "general" ribbon disappears, which may be an error or a conflict caused by conditional formatting.
Instead of using a complex measure for the title, consider using a simpler measure or a static title to see if the issue persists.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thank you for your answer.
I checked and all the tables and the model used are correct.
There are no conditional formatting used in the visuals.
As per the measure, I checked doing a fake Power BI with dummy values and the issue still persists.
If I have the Title as a measure, the visual fails. However, with a text, it works properly.
The measure used = "Title defined via measure"
As I see this, it looks like an issue maybe with this version of Power BI?
I am using: Version: 2.124.1960.0 64-bit (janvier 2024)
Best,