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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
fbittencourt
Helper III
Helper III

Change parameter or calculated columns to improve the time to charge on my table visual

Hi all!!
 
I have a issue to charge my table, it´s taking a long time, the issue on performance analyser is the dax query, I have only this parameter applied to change the two diff, types of charge.
Is there a diff way to create a new mesure or parameter to improve the speed?
 
fbittencourt_0-1750070369185.png

 

 
Paramètre = {
    ("Charge unite", NAMEOF('FAIT_INDICATEURS'[Charge unite]), 0)
    ,("Charge AED Unite", NAMEOF('FAIT_INDICATEURS'[Charge AED Unite]), 0)
}
 
I have also two calculated colums, my idea is change the calculated columns for a new columns is power query:
 
Nom du Projet = IF(REF_PROJET[Code projet] & " - " & REF_PROJET[Libellé projet] ="- - -","- Disponibilité Totale",REF_PROJET[Code projet] & " - " & REF_PROJET[Libellé projet])
 
Nom de la Ressource = REF_RESSOURCE[Nom ressource] & " - " & REF_RESSOURCE[Prénom ressource] & " (" & REF_RESSOURCE[UID ressource] & ")"
 
tks all!
1 ACCEPTED SOLUTION
v-agajavelly
Community Support
Community Support

Hi @fbittencourt 

It looks like your table visual is taking too long to load because the DAX query is doing too much work behind the scenes, especially with that parameter and your calculated columns. Don’t worry, here’s a clean and easy way to fix it and speed things up.
Move the calculated columns to Power Query. Those two columns you created using DAX like “Nom du Projet” and “Nom de la Ressource”  they’re better off created in Power Query, not DAX. Why?

Because Power Query does this once when data loads DAX has to carry them around every time you view the report.


In Power Query, For Nom du Projet.

if [Code projet] & " - " & [Libellé projet] = "- - -"

then "- Disponibilité Totale"

else [Code projet] & " - " & [Libellé projet]

For Nom de la Ressource:


[Nom ressource] & " - " & [Prénom ressource] & " (" & Text.From([UID ressource]) & ")"

You’ll find this in Transform Data -- Add Column -- Custom Column.

 

Now Replace your parameter logic with a simple slicer

That Paramètre = { ... } logic is making Power BI work too hard. Instead, let’s create a small helper table and use a cleaner measure.

Create a new table (no need to link it) and use bellow measure.

Charge Options = DATATABLE("Charge Type", STRING,{{"Charge unite"},{"Charge AED Unite"}})

Now create one measure that changes automatically based on what you select.

Selected Charge = SWITCH(SELECTEDVALUE('Charge Options'[Charge Type]),"Charge unite", SUM('FAIT_INDICATEURS'[Charge unite]),"Charge AED Unite", SUM('FAIT_INDICATEURS'[Charge AED Unite]))

 
------------------------------------------------------------------------------------------------------------------------------
If this solution works for you, please consider marking it as accepted so others facing a similar issue can benefit too.

Regards,
Akhil.

View solution in original post

2 REPLIES 2
v-agajavelly
Community Support
Community Support

Hi @fbittencourt 

It looks like your table visual is taking too long to load because the DAX query is doing too much work behind the scenes, especially with that parameter and your calculated columns. Don’t worry, here’s a clean and easy way to fix it and speed things up.
Move the calculated columns to Power Query. Those two columns you created using DAX like “Nom du Projet” and “Nom de la Ressource”  they’re better off created in Power Query, not DAX. Why?

Because Power Query does this once when data loads DAX has to carry them around every time you view the report.


In Power Query, For Nom du Projet.

if [Code projet] & " - " & [Libellé projet] = "- - -"

then "- Disponibilité Totale"

else [Code projet] & " - " & [Libellé projet]

For Nom de la Ressource:


[Nom ressource] & " - " & [Prénom ressource] & " (" & Text.From([UID ressource]) & ")"

You’ll find this in Transform Data -- Add Column -- Custom Column.

 

Now Replace your parameter logic with a simple slicer

That Paramètre = { ... } logic is making Power BI work too hard. Instead, let’s create a small helper table and use a cleaner measure.

Create a new table (no need to link it) and use bellow measure.

Charge Options = DATATABLE("Charge Type", STRING,{{"Charge unite"},{"Charge AED Unite"}})

Now create one measure that changes automatically based on what you select.

Selected Charge = SWITCH(SELECTEDVALUE('Charge Options'[Charge Type]),"Charge unite", SUM('FAIT_INDICATEURS'[Charge unite]),"Charge AED Unite", SUM('FAIT_INDICATEURS'[Charge AED Unite]))

 
------------------------------------------------------------------------------------------------------------------------------
If this solution works for you, please consider marking it as accepted so others facing a similar issue can benefit too.

Regards,
Akhil.

Thank you very much for your answer !!

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.