We have a filter, where the user can choose a measure, which we then show in a linechart. The measures to choose have different format_strings ('#,##0 €', '0.00', 'percent'). How can we set the format_string of the vertical axis matching the format_string of the chosen measure?
Unfortunately 'format_string' is not accessible as property of the measure (so [measures].[count sales].properties("format_string") doesn't work).
We tried to find something in 'icCube Serial' as well as in 'Google Generic Chart' without success.
Related
Currently, I have a Power BI Map that shows company locations, both by address and latitude/longitude. I am using the full address for specificity, but the lat/long for calculating distance. I'm using Great Circle formulas to calculate the distance (in miles) from a selected location to generate which stores should be visible to the user and which should not. The ones too far away (in the picture, more than 20 miles) have size = 0. The one closest to the selection has size = 1, and the ones somewhere in between have size 0.25.
In the data set I'm using are KPIs corresponding to all national locations. Is there a way to make a report/card/etc. that would show me the KPIs associated with the locations visible on the map? I know I can get the bubbles/labels to show a specific data point (e.g., "Customers per Week"), but there are multiple KPIs I want to show per location. It would be very handy to be able to use something like a paginated report/matrix, filtered on only the visible locations. How might I go about doing something like that?
I figured it out.
You put a filter on the visual of the matrix/table/etc. with the KPIs that says
"Map Point Size > 0," so that only the visible data points show up in the table itself.
My spreadsheet has over 30 conditional formatting rules and I was wondering if I could combine them.
I've attached the picture to give an idea but basically, the user can set/change the cancelation policies on the right (BC9:BF18) by setting a start/end date and selecting a policy.
I then use conditional formatting to color the calendar using this info (each cell of the calendar is set to its actual date, so the blue June 1 cell actually contains 01/June/2021 but is formatted to just show 1). For each row of the BC9:BF18 table, I have the following rules (eg. for first row [9]):
=AND(E9>=$BC$9,E9<=$BE$9,$BF$9="High") - Change to blue
=AND(E9>=$BC$9,E9<=$BE$9,$BF$9="Standard") - Change to white
=AND(E9>=$BC$9,E9<=$BE$9,$BF$9="Peak") - Change to red
=AND(E9>=$BC$9,E9<=$BE$9,$BF$9) - Change to a set color
That's 4 rules for each of the 10 lines (BC9:BC18), so 40 different conditional formats.
I'd now like to add to that that if the day is a holiday (holiday dates will be in a table below, let's say BC30:BC60) then make the font red but keep the background color in line with the cancelation policy.
This will require loads and loads more conditional formatting rules which would need to go above all the old rules eg. =AND(E9>=$BC$9,E9<=$BE$9,$BF$9="High",[OR(E9=$BC$30, E9=$BC$31....)] - Change to blue with red font, Can anyone see a way to simplify this?
I have a few suggestions but I'm not sure if they'll work:
(a) Changing the order so that the end date doesn't matter, the next formula will overwrite on its start date
(b) Checking all policies that match 'High' (so if(BF9:BF18='High'... somehow get that start/end date etc.
(c) for the new bit (checking if the date is in table BC30:BC60) there must be an easier way than checking if the date matches BC30 then BC31 then BC32 `=OR(E9=$BC$30,E9=$BC$31,E9=$BC$32, etc.
To avoid your option "c" you can use the MATCH function. Create a conditional rule which applies to all the ranges where you want the font color to be red if holiday.
Example:
Suppose your holiday list is in range A2:A and the date you are checking is in C2 then the custom conditional formula would be:
=match(C2, A1:A)
I've got a problem in PowerBI which im trying to solve for quite a while now.
I made a histogram which shows me how often a value exists.
For the values I have a upper and lower limit.
Also I want to have a vertical targetline which shows me where the values should be.
There's also a slicer where I can select different stations and depending on that the values, limits and targetgoal change.
The problem is that the targetline doesn't always appear. Always then when there is no value at the exact spot where the targetline should be.
In this Picture the target line should be at 61. but there is no "Wert".
I really tried a lot of things to get it working but it just do not want to work. It only works if I set "show all values" on the shared axis. But I only want to see All_Values within the limits.
The DAX for the target line is: targetline = IF(ISFILTERED(Stationen[Station]), IF( VALUES('Values'[All_Values]) =[Target],300,0),BLANK())
So I hope there is a possibilitiy to only show "All_Values" in between the limits. I tried to write a measure but there are no measures allowed as shared axis.
Values_Between = CALCULATE(VALUES('Values'[All_Values]),Filter('Values'[All_Values]>[LL] && 'Values'[All_Values]<UL))
Because when I only show All_Values between the Limits, I can turn on "show values whith no data"
I would really appreciate if someone could help me. It can also be a completely different approach.
I have the following graph:
"1" is a LineSeries, and "2" is a columnSeries. I set the width of the columnSeries like this:
series.columns.template.width = am4core.percent(90);
But as you can see, the columns are far away from 90% width.
Interestingly, without the LineSeries, it looks like this, which is what I want it to look like:
Furthermore, if I write a very high value (80 000) instead of 90, I get the desired columns:
I noticed that the dateAxis behaves differently(different time showing), but I cannot see where this is coming from.
Also, this high value for percentage is not a solution, because it has different widths on different graphs
So after experimenting I found out that the only way to avoid something like this is to use an own dateaxis for columns.
If, for example, you want a line+column, you can add a dateAxis to the line, and a dateAxis to the column.
If you have multiple columns, you could either use one dateAxis for all of them, or give one to every single column. The latter will make the columns "stack", so they are on the exact same positions if one would use the same dates for both datasets.
Furthermore, doing so means that you have to disable labeling on all dateaxes except for one, otherwise the labels on the xAxis will stack.
I need to define a calculated member in MDX (this is SAS OLAP, but I'd appreciate answers from people who work with different OLAP implementations anyway).
The new measure's value should be calculated from an existing measure by applying an additional filter condition. I suppose it will be clearer with an example:
Existing measure: "Total traffic"
Existing dimension: "Direction" ("In" or "Out")
I need to create a calculated member "Incoming traffic", which equals "Total traffic" with an additional filter (Direction = "In")
The problem is that I don't know MDX and I'm on a very tight schedule (so sorry for a newbie question). The best I could come up with is:
([Measures].[Total traffic], [Direction].[(All)].[In])
Which almost works, except for cells with specific direction:
So it looks like the "intrinsic" filter on Direction is overridden with my own filter). I need an intersection of the "intrinsic" filter and my own. My gut feeling was that it has to do with Intersecting [Direction].[(All)].[In] with the intrinsic coords of the cell being evaluated, but it's hard to know what I need without first reading up on the subject :)
[update] I ended up with
IIF([Direction].currentMember = [Direction].[(All)].[Out],
0,
([Measures].[Total traffic], [Direction].[(All)].[In])
)
..but at least in SAS OLAP this causes extra queries to be performed (to calculate the value for [in]) to the underlying data set, so I didn't use it in the end.
To begin with, you can define a new calculated measure in your MDX, and tell it to use the value of another measure, but with a filter applied:
WITH MEMBER [Measures].[Incoming Traffic] AS
'([Measures].[Total traffic], [Direction].[(All)].[In])'
Whenever you show the new measure on a report, it will behave as if it has a filter of 'Direction > In' on it, regardless of whether the Direction dimension is used at all.
But in your case, you WANT the Direction dimension to take precendence when used....so things get a little messy. You will have to detect if this dimension is in use, and act accordingly:
WITH MEMBER [Measures].[Incoming Traffic] AS
'IIF([Direction].currentMember = [Direction].[(All)].[Out],
([Measures].[Total traffic]),
([Measures].[Total traffic], [Directon].[(All)].[In])
)'
To see if the Dimension is in use, we check if the current cell is using OUT. If so we can return Total Traffic as it is. If not, we can tell it to use IN in our tuple.
I think you should put a column in your Total Traffic fact table for IN/OUT indication & create a Dim table for the IN & Out values. You can then analyse your data based on IN & Out.