I am new to power bi and I am working on visualisations but I am having some trouble how do I get distinct values in a slicer.
I am wondering how does one remove duplicates from a slicer filter using dax or is their a simpler way.
I am using excel as my data source.
I am using a column called Period which has data like the following.
12
13
14
15
15
But there are duplicates in the source data which I dont no how to filter only on the slicer.
The slicer will only display DISTINCT values BUT if you have duplicate values in your source data you'll need to account for it. You can do this by creating a simple measure on whatever field you are slicing using some logic or built in functions like DISTINCTCOUNT, DISTINCT, VALUES etc..
Related
I'm new to DAX so please bear with me.
Can I use the IN operator in DAX to create a query directly in Power Bi desktop?
For example, the screenshot below displays over 120 curencies in DimCurrency.CurrencyName. Is it possible to create a DAX query where I can include all my filters using IN operator?
For example, maybe something like this?
CALCULATE (
[Sales Amount],
Products[Color] IN { "Red", "Black" }
)
The reason I'm interested in using DAX is because my current filter has over 200 different items, so I don't want to scroll through the 200-item list and select 5 different items.
This is a data modeling problem. In Dimensional Modeling terms your Dimension needs some additional attribute hierarchies to drive the filtering. This is just like why a Calendar table doen't just have a Day column, it needs Month, Year, Quarter, so you don't have to select all the individual Days.
Basically DimCurrency needs an additional column, so that you can include those 50 currencies by selecting fewer values of that new column.
One way to modify your data model is with DAX calculated columns, with an expression of the form
IsFacoriteCurrency = 'DimCurrency'[CurrencyName] in {"Algerian Dinar","Argentine Peso"}
you can also modify the data model in the data source or in Power Query.
I am loading an Excel file, in which it has 43 rows, all the rows are identical. This is the only file I'm loading and there are no connections relationships in the model whatsoever.
When I plot my data into a table visual, and choose not to summarize any of my fields, Power BI still shows me one row. While if I change any of the field to do a count of it, it shows me correctly that I have 43 rows. I need to be able to see all the 43 rows in my table.
Why is Power BI summarizing my data even if I command it not to do so?
Am I missing something simple?
Input table as seen in Power BI data tab:
The visual I'm trying to create:
The table visual in Power BI behaves similar to a Pivot Table in Excel.
W/o an aggregation defined, the "Values" fields behave like "Rows" in a Pivot Table and you will only see distinct items or distinct item combinations. You have 43 identical records, hence it is represented as one row in the visual.
With an aggregation defined (Sum, Count, ...) the field behaves like "Values" in a Pivot Table, and you get the result of that aggregation, filtered by the distinct items/combinations to the left, which is again one row in your case.
If you just want to show all the records in a table visual, you'll have to make them unique. The easiest way to achieve that is by adding an index column in PowerQuery and then also showing that index in the table visual.
However, this is not exactly what Power BI is made for and you are probably better off by switching to something like PowerPoint instead.
And btw., newer show sceenshots in stackoverflow, always provide sample data instead.
I am trying to set up a dashboard with data that looks similar to this:
As you can guess, all of the 'rate' columns are related. I know to create a graphic that shows the totals for all 'rates' I first need to create a measure that is the sum of these 4 columns. My question is, how do I filter that total, based on the columns in the measure?
For example, if I had a line graph for the 'totals' measure:
Is there any way to create a filter visual that would allow me to see just the AA rates on this graph (that is, only measure the sum of the AA rates) or just the UA rates, etc.? Or is there a way to put all 4 columns on the same graph...
and then create a filter visual so single out one of the values fields?
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.
How to add common date slicer which will filter two or three charts data based on date column of those charts
i have tried to create a date table and applied relation and when i used date slicer it is showing empty data even though data is there in the mentioned dates range
I need to create a common date filter for three charts present in power bi report. three charts using three different tables and with different columns we dont have any relation between them. But all three tables have a date column so Now i need to create a common date slicer so that i can filter using that and results should be generated
slicer should filter data of multiple charts.
The best suggestion is to build your own date table in Power BI. You can take a look at this post here for more details.
Now you might end up having to normalize the dates in your existing tables as well to ensure that you are linking all tables on a common date type.