Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

New table using variable and custom columns

Hello everyone,

I'm trying to create a new table using a viariable (easy part) with custom columns (tough part)

 

1st step, create a calendar table, it works fine :

a_calendrier_global =
    VAR _mon_calendrier_ =
            CALENDAR(FIRSTDATE(t_intervention[int_date_programmation].[Date])
                    ;LASTDATE(t_intervention[int_date_programmation].[Date]))
 
RETURN
        _mon_calendrier_


2nd step, I know want to add a custom column, so I tried :

a_calendrier_global =
    VAR _mon_calendrier_ =
            CALENDAR(FIRSTDATE(t_intervention[int_date_programmation].[Date])
                    ;LASTDATE(t_intervention[int_date_programmation].[Date]))

RETURN
        SELECTCOLUMNS(
            _mon_calendrier_
            ; "date"; [Date]
            ; "test"; "Hello world !"
        )

but it really doesn't works, I'm having an error (in english something like La colonne "date" dans la table "a_calendrier_global" continent des liaisons non valides), I also even tried by using SUMMARIZE(_mon_calendrier;[Date]), same result

What have I missed or missunderstood ?

Thanks for yoru time.

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

Sorry for that, but we cannot reproduce this issue on my side with your shared DAX code,

We created a sample “t_intervention” table, and then create two calculated tables with your code,  we got the  result as following,

 

31.png32.png

 

 

We can also use ADDCOLUMNS function to add a column to tables, such as following:

a_calendrier_global =
VAR _mon_calendrier_ =
    CALENDAR (
        FIRSTDATE ( t_intervention[int_date_programmation].[Date] );
        LASTDATE ( t_intervention[int_date_programmation].[Date] )
    )
RETURN
ADDCOLUMNS ( _mon_calendrier_; "test"; "Hello world !" )

 

 

Could you please reproduce this issue with the latest version of Power BI Desktop ?  If  it does not contain any confidential information, could you please provided  a screenshot which contains error information.

 

BTW, pbix as attached.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

Sorry for that, but we cannot reproduce this issue on my side with your shared DAX code,

We created a sample “t_intervention” table, and then create two calculated tables with your code,  we got the  result as following,

 

31.png32.png

 

 

We can also use ADDCOLUMNS function to add a column to tables, such as following:

a_calendrier_global =
VAR _mon_calendrier_ =
    CALENDAR (
        FIRSTDATE ( t_intervention[int_date_programmation].[Date] );
        LASTDATE ( t_intervention[int_date_programmation].[Date] )
    )
RETURN
ADDCOLUMNS ( _mon_calendrier_; "test"; "Hello world !" )

 

 

Could you please reproduce this issue with the latest version of Power BI Desktop ?  If  it does not contain any confidential information, could you please provided  a screenshot which contains error information.

 

BTW, pbix as attached.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

It now works... I don't know what happened, sorry for the post...
But thanks for your time !

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.