Forum Discussion
JSON Design for Slicer
- 1 year ago
Thankyou, burakkaragoz and MFelix, for your response.
Hi SergeyA,We appreciate your inquiry on the Microsoft Fabric Community Forum.
Based on my understanding, you are attempting to apply JSON-based styling exclusively to the tile-style slicer, while keeping the dropdown and list-style slicers with a white background and dark text. However, the formatting from your JSON is currently being applied to all slicers.
At present, Power BI's JSON theming does not support individual formatting of slicers based on their layout (tile, list, or dropdown). Styling defined under the "slicer" category applies globally to all slicers.
Kindly follow the approach mentioned below, which may help resolve the issue:
- Use your existing JSON to apply the desired formatting globally (for the tile-style slicer).
- Manually override the dropdown and list slicers by using the Format pane. Set the background color to white (#FFFFFF) and the font color to dark (#000000).
- This method will enable you to maintain visual distinction while preserving theme consistency.
Additionally, please refer to the following link:
Use report themes in Power BI Desktop - Power BI | Microsoft LearnIf you find our response helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will help other community members facing similar queries.
Should you have any further questions, please feel free to reach out to the Microsoft Fabric community.
Thank you.
Hi SergeyA ,
This usually happens when the date fields are still in a non-standard format (like COM objects or OleDB types) before hitting pandas. Even though to_csv() works fine for most types, it won’t auto-convert those special types into readable strings.
You can fix this by converting all date columns to proper datetime format before exporting. Here’s a quick way to do it without manually listing each column:
for col in dataset.columns:
if dataset[col].dtype == 'object':
try:
dataset[col] = pd.to_datetime(dataset[col])
except:
pass # skip if it can't be convertedThis will attempt to convert any object-type column into datetime, and silently skip the ones that fail.
Then your to_csv() should export clean, readable date strings like "2023-02-01".
Let me know if you want to format the dates differently (like dd/mm/yyyy).
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI
- SergeyA1 year agoRegular Visitor
Hi burakkaragoz ,
Thank you for your response! I really appreciate it. However, my question is a bit different.All of my reports are using Live Connect, so I’m not able to change the data in Power BI directly (And there is no need to, as the data has been properly configured and reliably used for years). I used months in the two upper slicers just for illustration purposes — in reality, the month is only used in the bottom slicer, while the upper two (dropdown and list view) are used for other cases.
What I’m actually interested in is not the format of the data itself, but rather the formatting of the text as it appears in the report.