I have a Power BI report in which i want users to select "Period Type" in drop down. and when they chose values like Monthly or quarterly it should dynamically change the slicer values to monthly or quarterly.
example is given below.
When Period Type Is Selected To Montlhy
https://pasteboard.co/IYuYSO2.png
When Period Type Is Selected To Quarterly
https://pasteboard.co/IYuYcVw.png
And i have data set with DimDate Table and FactSales Table. Both are joined Table with One to Many relationship.
Your question looks tailor made for a visual from the marketplace. Check the following link out:
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380786?tab=Overview
This slicer will let you choose the frequency and then your slicer will change to reflect that. You can download this from the marketplace. If you have not done this before, you can do this by selecting "Import from marketplace" option after clicking on the 3 dots at the end of the Visualization tab. Hope this helps.
Related
I have 1 Fact Table Tbl_Import in my Pbix-file that is linked with an automatic generated calendartable.
I used a slicer and a table. The slicer is showing too much options. The first date in Tbl_Import is 16/12/2022, but in the slicer I have all the other months also.
Is there a way to limit the slicer options to the actual dates in the facttable?
I am using Power Bi Desktop (without Premium).
Yes. Create a measure which is
Measure = COUNTROWS(Tbl_Import)
Add the measure as a visual filter to the slicer with it restricted to showing a count > 0.
I'm trying to find the option to report sum of sales by month and country in data in Power BI.
At the moment the package defaults to count of sales and it reports like this:
I want change it so the chart reports and splits out the country.
On the Visualizations pane select the dropdown arrow on the Sales parameter and then switch from Count to Sum:
I want to change visualisations with a time period slicer.
This is an example of a page for a single month of data. I would like to have a time slicer that would allow me to select different months/time periods and show me the relevant data.
I thought about using buttons with bookmarks to be able to click between different months, but it is not feasible when more months come in. All the guides on the internet show how to change visualisations with time as an axis, so I don't know where to look.
Please let me know if there is a better way to do this!
In your data sources add separate column for date (or you can use existing column for that)
Next you have to create calendar from power bi or insert excel sheet, Its better to create calendar from power bi.
Then you need to make sure all the date columns are in date format. And make relationship between columns.
power bi desktop
Drag and drop created date column to the calendar column.
Then you have global slicer that affect to your selected visualization.
From slicer you can change slicer visualization as you want
I have a chart as below,
Here I have certain metrics which needs to be shown as Monthly, quarterly, yearly.
Ex. if monthly is selcted chart should show in months as mentioned,
if quarterly is selected chart should show in quarter and same applies for yearly.
So I tried with following code,
Created a table,
|Monthly|1|
|Quarterly|2|
|Yearly|3|
Created the selcted value measure as
select = selectedvalue('table1'[column2])
Created a switch to use that calculated column in axis of the bar chart,
switch[select]
1,'calendar[Month]',
2,'calendar[Quarter]',
3,'calendar[year]')
Output is showing as variant data-type cannot be used in calcualted column,
I understand that some values are either text or number, how to change accordingly to same datatype.
I have tried with zero also it is showing the same error.
Is there any other approach to this dynamic changing of columns?
You can add buttons and use bookmarks to assign action based on Month, Quarter and Year to those buttons, all you need to do is create 3 visuals and align them then based on buttons make the visual visible/invisible and the update the bookmark.
I'm kind of new to the power bi. I want to calculate the monthly yearly totals from the column Amount and TRD_date column. Please see the below data
The solution does not require DAX. You can do this easily in Power Bi Report Desktop. Just follow these steps:
Step 1- create a new Report and on a blank report, click the Table visual (show highlighted in yellow below)
Step 2- Bring in your datasource and drag over to the Values area of the visual, the Date column first, then the Amount column second. Your values will look like:
Step 3- Remove (click the X) for the Date-> Quarter Value and Date-> Day value. This will total the amounts for you by Month and Year.
Your table will be a shown below:
My data is shown here for reference: