I have this formula to return to me a final measure that is 3.878.
The formula works properly in DAX and returns the 3.878...
However, when I use it in powerbi and select the new measure for my card - it round up to 4 and when I try to change formatting to currency and adjust the decimal places - within the card, the number doesn't budge from just displaying '4'
This is the formula I am using:
In DAX Studio
EVALUATE
ROW("Measure",SUM(Sheet1[Spiff])/DAY(MAX(Sheet1[ACTIVATION_DATE]))*DAY(EOMONTH(TODAY(),0)))
In Power BI
proj_spiff = SUM(Sheet1[Spiff])/DAY(MAX(Sheet1[ACTIVATION_DATE]))*DAY(EOMONTH(TODAY(),0))
It seems like it works - but, just can't get the formatting right so it shows 3.8 vs. 4. Any ideas here? Thank you
I actually tried this with a different style card and it worked. I was using an add-on for the the card style in question. Default works - so must be some type of nuance. Saw the formatting for the custom card is actually in the visual editing pain vs. top ribbon when you format the measure by selecting the measure. So for anyone who runs into something like this - just check your visual formatting options too.
Related
I am learning Power BI Desktop. I have a project already loaded for which I have created a
pie chart.
As you can see, the data is currently divided into two years: 2022 and 2021.
I also have data for previous years that I want to include in the chart. Unfortunately, none of these years has a high number. So I want to group them all into an "Other" category.
I've already tried using the RANKX function as described here (where I copied and pasted the formula from the comment and replaced the field name with my own) and here (where I went through the article step by step using my own field names). I used the exact format shown in both the comment and the article:
Rank = RANKX('Table','Table'[Percent],,DESC,Dense)
(Table is the table name I am using and Percent is the column I am trying to rank.)
When I added the new column to a table, though, PowerBI automatically gave me a sum calculation. This calculation gave me a 1 in each column. When I asked it not to give me a sum, it said it could not display the visual and took me back to the calculation screen.
EDIT: Thanks for your help Kevin! This is the table I tried to draw from. I am an idiot sometimes.
EDIT 2: Now I am trying to use a different field in the formula:
Rank = RANKX('FactClaimActivity','FactClaimActivity'[DirectIncurredLoss_ITD])
(This is the original field that I tried to base Percent on)
My table looks like this. (Yes, I know that 2016, 2017, 2019 and 2020 have negative values and 2014 and 2015 have $0 values. I just want to show what the data is.)
EDIT 3: This time I am also getting an error when I type in the formula, which says "A single value for column 'DirectIncurredLoss_ITD' in table 'FactClaimActivity' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
I do not understand why it wants a single result for a formula that ranks the data points based on this field. That seems like it defeats the whole purpose of the formula.
Yet when I use the formula, I get the same result as last time! This column is in the Fixed decimal number format, and it does have many different values.
EDIT: I've found the answer
New Category = IF('FactClaimActivity'[Rank]<=2,'FactClaimActivity'[LossYear],"Other")
The formula will help you get the correct result.
I'm new to PowerBI.
I wanted to create a scorecard that looks like the one in data studio where it displays the total value and percentage change from the previous period.
Below is the screenshot from Google Studio
You can add % from the data view in powerbi desktop,
PowerBI has some learning curve compare to Google Studio. I would recommend you to explore more and get yourself comfortable and try to find answers yourself.
But you should be able to achieve the output you're expecting using measures. Measures are similar to excel formula that allow you to calculate from existing values.
checkout the following resources:
Show Growth Value and Percentage in one Power BI Card visual
How to show percentage change in Bar chart visual in Power BI
I need to get a bar chart that displays percentages based on the simple division of 2 values. See below:
The calculation should be 'Services / Sum of Accounts' to get my %. (116,713 / 121,756 = 0.9585 [or 95.9%])
I have tried using Quick Measure, but I can't seem to get it to do what I want. I come from a background of SSRS, but the way PBI works appears to be different enough that I'm not sure how to accomplish this otherwise simple operation. Much thanks!
You probably need to write your own measure. You can start with a quick measure and modify the formula or create one from scratch.
I don't know what your data looks like but it might be something like
SUM(Table[Services]) / SUM(Table[Accounts]).
I am new to Power BI and with the limited time given, I am stuck at how to come up with:
Below Table B-Row1 ("1/20" and "M"-Monday cell) - how to
specifically place the date measures in their specific cell and put
it in one column?
How can I merge the cells under the Total column?
How to add all the numbers from the Type1 and Type2 columns and place it in the merged cell in #2?
Any clues/direction/links on how to achieve the Target Table B below will be much appreciated.
PS. Below Table A. Current is just using Matrix Visualization in Power BI.
You can't exactly do what you are after. PowerBI allows you to rapidly put amazing visuals together however that comes at the price of lack of (easy) flexibility. You could build your own custom visual or look in App Source for a visual that does this, or build the Visual in some other tool (via custom code).
However, I'd recommend sticking with the PowerBI matrix, which will give you a cascading drill down and work out how best to align your data to it and other out of the box visuals. Once you start to delve in to convoluted work-arounds to give users data in exactly the format they request you start to burn a lot of time. Look for alternatives to tell the data's story and work with your end-user to buy in to it.
Just wanna share that I have resolved my problem not using one type of visualization, but through using 3 different visualizations in Power BI. I used:
1 Table visual for Date column
1 Table visual for Total column
1 Matrix visual for the Code+Type mapping and counts
I also used DAX function to get the Date format and another DAX function used for both Total and Code+Type counts(to filter data according to the specified date).
Thanks for the response, #Murray and #RADO.
In my report, my date dropdown slicer looks like this when the report first loads:
I want it to display without all the extra time and timezone nonsense like it does when I manually select one of the boxes after the report loads:
Does anyone know why this happens or how to fix it?
Edit: Here's a minimal .pbix example: Link to File
I'm on the August 2018 version now, and it seems to me that this issue has been fixed.
At least I'm not able to reproduce it.
With a dataset like below, a Line Chart and a regular Slicer, I get this:
Date,Value
2017-01-12,1
2017-01-13,4
2017-01-14,2
2017-01-15,4
2017-01-16,2
2017-01-17,2
2017-01-18,2
2017-01-19,5
2017-01-20,5
2017-01-21,5
2017-01-22,5
2017-01-23,6
2017-01-24,3
2017-01-25,6
2017-01-26,6
2017-01-27,5
2017-01-28,8
2017-01-29,4
2017-01-30,2
The slicing details (the All part in Date All) can be turned off by setting Filter Restatement under Slicer Header to Off. Maybe that would have solved the issue?
Please note that I've ignored the date hierarchies in both the Line Chart and the Slicer:
As a suggestion, you might want to try creating a new Column using the FORMAT function.
This is something I often do to provide a more human readable date for my slicer.
EG:
DisplayDate = Format([SomeDateField], "ddd d mmm yyyy" )
Once done - you will want to select the column - then SORT by your original date column. Otherwise you may get some odd results ;)