Forum Discussion
Color value
- 1 year ago
We resolved the issue, but not in the way you suggested. Thank you.
I am attaching a test Power BI file with data sourced from Excel. How cen i atach it??
https://drive.google.com/file/d/1MSLK-mPlkcooboyqwuu2WHZDFcg4mbpl/view?usp=sharing
My goal is to continue the color formatting with the same color even if there is no data for a specific date — the color should remain consistent until a change in the value triggers a new color, and so on.
I would appreciate your help with achieving this.
Hello LeaRupnik ,
Thank you for reaching out to Microsoft Fabric Community Forum.
SolomonovAnton Thank you for your quick response.
LeaRupnik Thanks for clarifying your goal!
You're absolutely right in wanting the color to persist across dates even if there’s no data for that specific day , and only update when the value changes.
As SolomonovAnton already pointed out in Step 2, the measure using TOPN to get the last known non-blank state is exactly what you need for this:
This approach ensures that:
- Even if there’s no [ODM Barvanje Base] value for today’s date,
- The visual will use the most recent past value for coloring,
- Creating a "carry-forward" effect until a new status appears.
Just make sure:
- Your date dimension has a full continuous range of dates (no missing days).
- You use this [ODM Barvanje Trajno1] measure for conditional formatting in your visuals.
If you're still facing slow rendering, try minimizing the number of visuals that reference this measure, and check performance using DAX Studio or Performance Analyzer.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! |
Regards,
B Manikanteswara Reddy
- LeaRupnik1 year agoHelper III
I have now added the persistent coloring logic (barvanje trajno) to the example above and integrated it directly into the report.
However, the coloring is not displaying correctly, and the performance is very slow.
Could you please assist?
Unfortunately, I don’t have experience using DAX Studio or Performance Analyzer.
https://drive.google.com/file/d/1MSLK-mPlkcooboyqwuu2WHZDFcg4mbpl/view?usp=sharingThank you in advance!
- Anonymous1 year agoNot applicable
Hello LeaRupnik ,
Apologies for the delay in getting back to you.
Thanks for the update! Let’s break this down and fix the two main problems you're having:
- Coloring Not Showing Up Correctly
This often happens because of one of these reasons:
- The measure [ODM Barvanje Base] is returning blank values, especially for future dates.
- Your date table isn’t set up properly or might be missing some dates.
Here’s what you can check and fix:
- Make sure your date table is marked as a proper Date Table:
In Power BI, go to your 'd CAS Cas' table → right-click it in the model view → choose "Mark as Date Table" >pick the [CAS Datum] column. - Check that your date table has all dates (no gaps):
It should have a continuous range of dates ,no missing days. If needed, you can create one using Power BI’s CALENDAR() function or CALENDARAUTO() funtion. - Confirm the relationship:
Make sure 'd CAS Cas'[CAS Datum] is connected to 'f ODM Odpoklici_MES'[ODM Datum_odpoklica] in the data model.
- The Report is Very Slow
Even if your formulas are optimized, reports can still slow down when:
- The measures are used across too many visuals at once.
- Or the dataset is very large.
Here’s what you can try:
Option 1: Pre-calculate the data
Instead of calculating everything on the fly, create a smaller summary table ahead of time:
SummaryTable =
SUMMARIZE(
'f ODM Odpoklici_MES',
'f ODM Odpoklici_MES'[ODM Odpoklic_ID],
'f ODM Odpoklici_MES'[ODM Datum_odpoklica],
"Kolicina", MAX('f ODM Odpoklici_MES'[ODM Kolicina_po_odpoklicu]),
"ZalogaKoncni", MAX('f ODM Odpoklici_MES'[ODM Zaloga_koncnih_kosov]),
"ZalogaMehanska", MAX('f ODM Odpoklici_MES'[ODM Zaloga_mehansko_obdelanih_kosov])
)Then use this summary table in your [ODM Barvanje Base] measure — it’s much faster this way.
Option 2: Use Performance Analyzer (no coding needed)
If you’re not familiar with DAX Studio, try Power BI’s built-in Performance Analyzer:
- Go to the View tab in Power BI Desktop.
- Click Performance Analyzer.
- Press Start Recording, then refresh your visual.
- You’ll see which visuals take the longest , click Copy Query next to a slow one and paste it here or into DAX Studio if needed.
This will help identify what’s slowing things down.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
B Manikanteswara Reddy
- Anonymous1 year agoNot applicable
Hi!
I'm Lea's coworker, I took over this issue. Unfortunatelly this also doesn't work. I tried limited output data for only 1 buyer, but it is also too much. It says the memory is not enough. (Photo attached). I did try to analyze with Performance Analyzer, but as long as it is working I have no option to Copy Query (it is not clickable) and when it returns error, the Copy Query remains gray, not blue and clickable as the rest of them.Thank you for your help!