Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Solved! Go to Solution.
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.
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 !!
User | Count |
---|---|
84 | |
78 | |
70 | |
47 | |
42 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
40 |