I wanna highlight the background of a slicer when more then 10 items are selected.
My measure:
ColorBackground = IF(COUNTX(ALLSELECTED(Table), Table[Column])<=10, "Green", "Red")
So I use conditional formatting by field value.
When I use the conditional of an table column or as background for a textbox or shape it works as expected.
But when I use the same for the background of a slicer the background the background is always red.
Any ideas whats going wrong here?
Warm regards
Thank you.
As workaround I placed a shape under the slicer where conditional formatting works.
It doesn't work on a slicer. There are posts on powerbi.com asking for this functionality.
Related
I've only been able to accomplish this with a tooltip, but I need to paste the final viz into PowerPoint, so hovering is not an option for the audience.
You can't with native visuals. There may possibly be a way with calculation groups and custom format strings but it would be a hack. If you want more control over your visualisations, I can recommend Deneb.
I saw a picture of slicers in which the values have no background. Is this possible with the native power bi slicers visual?
Here's my issue
Set your filter pan's background transparency to 100% as below-
Thank you mkRabbani. Your answer helped a lot. However, since my slicer values background already had a color, it did not work. I had to create a new slicer, and then set transparency to 100%.
I am creating a PowerBI report, where I have a table whose metrics (Income, Expenses or Profit) change using a "SWITCH" Dax function and using a slicer (as shown below):
This table also has a "Conditional background color" depending on its values. As you can see, for "Income" the color is a "blue palette". If I change the slicer to "expenses" color will still be "blue" and I would like to know if there is a way to change that color to, for example, "red palette"?
Thank you very much
I am creating a bar chart using charts. The current work is below:
The colour represents continents. Notice that the default legend is blue showing undefined. I want to have the legends showing each colour and its represented continent. That is, to be able to display legends of the bar's background and customise their label.
How can I achieve that?
Really appreciate your help! Thanks
Instead of putting all your data in a single dataset you will need to make a different dataset for each continent and then set the label of that dataset to the continent
I have a QCalendarWidget and some days of month are colored (for example holidays are red). When I select a day which is colored, selection clears the color and I can't see it's original color. But when I deselect that day - color is back. Please see in pictures.
Is there a way to keep color even if a day is selected? I know that there is a way to do this for QTableView with delegates, but I can't find anything like this for QCalendarWidget. Any Ideas? Thank you for your time.
You can get access to the internal QTableView object of your calendar widget like this:
QCalendarWidget *c = new QCalendarWidget;
QTableView *view = c->findChild<QTableView*>("qt_calendar_calendarview");
if (view)
{
view->setItemDelegate(new MySuperCalendarDelegate);
}
Then you can use a custom delegate that will set proper background and foreground colors.
Also you can check my previous answer on QCalendarWidget styling.
I know it's more than a year, if I understood the question correctly, I think I found a better solution to this. In my case, every time a date is selected, I set the date to yellow color doing the following:
QTextCharFormat fmt;
fmt.setBackground(Qt::yellow);
m_ui->calender->setDateTextFormat(date, fmt);
and that very time I also set the stylesheet of the QCalenderWidget like this:
setStyleSheet("QTableView{selection-background-color: yellow}")
If I need to de-select, I set the date color to the original, which is white and also do the following:
setStyleSheet("QTableView{selection-background-color: yellow}")
This works great for me.