How to add multiple column to slicer in Power BI - powerbi

How can we show multiple columns into one slicer? Let's say I have three columns - product category, product and type. I want display three columns into one slicer.
How can I do this in Power BI Desktop?

You will need to go to your data model and add a new calculated column to the relevant table that concatenates the three columns. Use this new column as the field in your slicer.
SlicerData = [column1] & ", " & [column2] & ", " & [column3]
However, in most cases you get a lot more flexibility by having three different slicers, one for each column. Not to mention three slicers with 10 items each is much more convenient than one slicer with 1000 items.

Related

Making DAX calculated table respond to filters on other table

I have a DAX table "Sumtable" that calculates the the number of rows in "Maintable" for two cases: (1) all rows in Maintable and (2) the subset of rows where Cat = "A".
Sumtable = {
("Full set", COUNTROWS(Maintable)),
("Subset", COUNTROWS(FILTER(Maintable, Maintable[Cat] = "A")))
}
I want to viz Sumtable and make it respond to filter settings on Maintable. For example when I select Maintable[Sex] = "Male" the totals in Sumtable should reflect that. What is the right way to accomplish this?
For example when I select Maintable[Sex] = "Male" the totals in Sumtable should reflect that.
Just make this two measures instead of a calculated table.
If you want these measures to appear under Sometable, you can create a one-row, one-hidden-column table with two measures, instead of two calculated columns.
And when you hide all the non-measure columns on a table it becomes a "Measure Table" with a differentiated icon.
Solved it with this: analytics-tuts.com/bar-chart-using-measures-in-power-bi

Power BI: Count the number of times a value appears in another table

I have 2 tables, one of which includes a column of id numbers. The other table has a column with multiple occurrences of each id-number. I would like to add a column to the first table telling me how many times each id appears in the second table.
Power Bi is new to me so I have gotten nowhere so far.
If you have relationship between these two table on this ID then you can use simple measure:
CountOF = CALCULATE(countrows(detail))

Group 10 columns of data to gain distinct count of rows Power BI

I'm trying to display all of the distinct values within this table (there are many other columns in this table) and show how many rows each distinct value shows in.
I have tried to use group by but this does not work. It needs to be filterable by country from another column but i can do that by page filter.
I am trying to show what the top 5 associations are in terms of appearance.
enter image description here
Put the 10 columns in a Table visual. Then create this measure and add it too. Then sort descending on Distinct.
Distinct = COUNTROWS('Your Table Name')
To see only the Top 5, go to the Filter pane, and pick the first column and set the Filter type to Top N, and then Top 5 by the Distinct measure.

Create table comparing Two Queries with identical fields/field names

I would like to create a table to compare Month To Date (MTD) Vs YTD Sales data metrics
I am using two queries:
1st query = YTD Sales data (Two fields: Sales and Quotes)
2nd query = MTD Sales Data (Two Fields: Sales and Quotes).
Each query has the same field names, just different data
I would like to output a table like the following
How to I create the above table? At the moment I can only create a table like the following:
The latter 1x4 table only works if I appropriately name the fields. But definitely isn’t what I want, because with enough fields, the table could go on forever.
Any help would be appreciated
In the query editor, create a label column for each table that labels what they are and then append the two tables together so you get something like this:
Then you can create a matrix visual with the Label column in the Columns field and the Sales and Quantity columns in the Values area.
Make sure you've switched "Show on Rows" to "On" under the Format > Values section of the Visualizations pane.

Power BI creating table/report from multiple tables

I am new to power bi and trying to create table/report that pulls data from three different tables.
I have one table "Conversion": with columns like: conversion_id, date_converted,channel, revenue and other columns and measures
Second table "Qualification": Qualification_id, date_qualified, channel, revenue and other columns and measures
Third table "Spend" : Date, channel, Spend and other columns and measures
Qualification_id is same as conversion_id but it could have different dates (dates for id that got converted and qualified many times differ) and not every id that converts qualifies.
I want to display sum(spend) , count of qualifications , count of conversion and qualification rate (qualification/conversion) grouped by date and channel in one report
There were no relationships detected in amongst these three tables. Please note that the date values are not unique. I am looking into creating star schema and calculated table but since I am super new to this I am struggling to create this view. Any help would be appreciated!
If I have understood correctly ,conversion_id & date_converted will match Qualification_id & Qualification_date ,if the Conversion_ID qualifies.
If this is the case maybe you can create a new Column in both the tables which will be a concatenation as below and join those two columns like
Qualification_Key = Qualification_id & "-" & Qualification_date
Conversion_Key = Conversion_ID & "-" & date_converted