One slicer for 2 tables power BI - powerbi

I have two tables, first contains all AreaPath data module wise,
WorkItemId
Title
ChangedDate
State
StateChangeDate
AreaPath
27997
logo in Code Provider Access
16-03-2021 19:25
New
12-03-2021 21:53
Admin
28339
Password policy needs to be updated
12-03-2021 21:54
New
12-03-2021 21:54
power
28464
Update Names of users names
12-03-2021 21:54
New
12-03-2021 21:54
Admin
29918
Add capturing capabilities on the Public Portal
24-03-2021 17:27
New
23-02-2021 21:53
power
29919
Refactor the code to make sure that the generated value done in a single location.
23-02-2021 21:55
New
23-02-2021 21:55
Empower
29943
Placeholder : "Provider Search Compare" needs to added on the Public Portal
11-03-2021 17:58
New
23-02-2021 22:26
power
29948
Add Document upload feature
23-02-2021 22:51
New
23-02-2021 22:51
power
And i have 2nd table contains AllIteration,
AreaPath
IterationPath
StartDate
EndDate
power
power - Sprint1
08-03-2021 00:00
13-03-2021 00:00
Empower
power - Sprint 3
15-03-2021 00:00
20-03-2021 00:00
power
power - Migration
22-03-2021 00:00
27-03-2021 00:00
Admin
power - License
29-03-2021 00:00
03-04-2021 00:00
Using above table I have created one line graph and one multirow card in a single page. I added slicer for AreaPath to categories wise I can see graphs. But the issue is I can only use slicer for belongs to one graph and table. How we can change value of other graph using slicer?

Related

SSAS/ PowerBi / DAX - How to combine multiplie colunms in one

I am using Power Bi with SSAS Tubular Model.
I have a table that causes duplication due to multiple managers on a project.
Projekt Manager Revenue
Car-Sales Bob 200k
Car-Sales Chris 200k
Car-Sales Tina 200k
I want to combine these Manager entries to one entry with commas.
Projekt Manager Revenue
Car-Sales Bob,Chris,Tina 200k
How do I write this in DAX?
This should be done upstream in your data shaping stage but if you're stuck with DAX, then create a new table as follows:
Table 2 = ADDCOLUMNS( SUMMARIZE('Table', 'Table'[Projekt], 'Table'[Revenue]), "Manager", CONCATENATEX('Table', 'Table'[Manager], ","))

Cumulative calculation in power BI using DAX funtion

I want to get count that lower date value from one table comparing date value from another table.
My first table Says NewStateTable,
WorkItemId
Title
ChangedDate
State
StateChangeDate
AreaPath
27997
logo in Code Provider Access
16-03-2021 19:25
New
12-03-2021 21:53
power
28339
Password policy needs to be updated
12-03-2021 21:54
New
12-03-2021 21:54
power
28464
Update Names of users names
12-03-2021 21:54
New
12-03-2021 21:54
power
29918
Add capturing capabilities on the Public Portal
24-03-2021 17:27
New
23-02-2021 21:53
power
29919
Refactor the code to make sure that the generated value done in a single location.
23-02-2021 21:55
New
23-02-2021 21:55
Empower
29943
Placeholder : "Provider Search Compare" needs to added on the Public Portal
11-03-2021 17:58
New
23-02-2021 22:26
power
29948
Add Document upload feature
23-02-2021 22:51
New
23-02-2021 22:51
power
My another table Says AllIterationTable,
AreaPath
IterationPath
StartDate
EndDate
power
power - Sprint1
08-03-2021 00:00
13-03-2021 00:00
power
power - Sprint 3
15-03-2021 00:00
20-03-2021 00:00
power
power - Migration
22-03-2021 00:00
27-03-2021 00:00
power
power - License
29-03-2021 00:00
03-04-2021 00:00
Now I want cumulative count of all WorkItemId in custom column of AllIterationTable where NewStateTable[ChangedDate] less than AllIterationTable[StartDate]
So I applied Dax function but it won't work for me,
ChangedDateBeforeSprintStart = COUNTROWS(FILTER(ALL(NewStateTable), NewStateTable[ChangedDate] <= AllIterationTable[StartDate]))
What should be my DAX function mapping two tables using Date condition and creating custom column in a table.
Try this :
= CALCULATE(COUNTROWS(NewStateTable), FILTER(NewStateTable, NewStateTable[ChangedDate] < (AllIterationTable[StartDate]) ))

DAX function on two table to count rows

I want to get count that lower date value from one table comparing date value from another table.
My first table Says NewStateTable,
WorkItemId
Title
ChangedDate
State
StateChangeDate
AreaPath
27997
logo in Code Provider Access
16-03-2021 19:25
New
12-03-2021 21:53
power
28339
Password policy needs to be updated
12-03-2021 21:54
New
12-03-2021 21:54
power
28464
Update Names of users names
12-03-2021 21:54
New
12-03-2021 21:54
power
29918
Add capturing capabilities on the Public Portal
24-03-2021 17:27
New
23-02-2021 21:53
power
29919
Refactor the code to make sure that the generated value done in a single location.
23-02-2021 21:55
New
23-02-2021 21:55
Empower
29943
Placeholder : "Provider Search Compare" needs to added on the Public Portal
11-03-2021 17:58
New
23-02-2021 22:26
power
29948
Add Document upload feature
23-02-2021 22:51
New
23-02-2021 22:51
power
My another table Says AllIterationTable,
AreaPath
IterationPath
StartDate
EndDate
power
power - Sprint1
08-03-2021 00:00
13-03-2021 00:00
power
power - Sprint 3
15-03-2021 00:00
20-03-2021 00:00
power
power - Migration
22-03-2021 00:00
27-03-2021 00:00
power
power - License
29-03-2021 00:00
03-04-2021 00:00
Now I want count of all WorkItemId in custom column of AllIterationTable where NewStateTable[ChangedDate] less than AllIterationTable[StartDate]
So I applied Dax function but it won't work for me,
Column = COUNTROWS(FILTER(NewStateTable, NewStateTable[ChangedDate] < EARLIER(AllIterationTable[StartDate])))+1
What should be my DAX function mapping two tables using Date condition and creating custom column in a table.
Calculated Column in AllIterationTable:
MyCol =
COUNTROWS(
FILTER(
ALL( NewStateTable ),
NewStateTable[ChangedDate] < AllIterationTable[StartDate]
)
)

Default slicer selection (latest date) in Power BI

My requirement is when a report will be opened in Power BI services by default, the latest date will be selected in a single select slicer.
Consider in import mode there are 10 dates are coming and assigned to a slicer (single select dropdown). By default it shows the older date as the selected date.
I need to do the opposite. It should be the latest date selected by default and if the user wants to select other dates they can change manually. My landing page by default should show the latest date dynamically.
It's not possible to select the latest date in slicer automatically. However, there is a kind of workaround for this which I have explained below.
Just create an additional column using original date like this:
Date 2 = IF('Table'[Date] = TODAY(), "Today", FORMAT('Table'[Date], "MM-DD-YYYY"))
Then use this newly created column in your slicer and manually select 'Today' in that slicer once and publish the file to the Power BI service. So the end user will always see 'Today' selected in a slicer by default which obviously represents the current date.
Note: if you want latest date to be selected which is not necessarily current date then you can create the column below:
Date 2 = IF('Table'[Date] = MAX('Table'[Date]), "Latest Date", FORMAT('Table'[Date], "MM-DD-YYYY"))

How do I do addition by row in Power BI DAX?

I would like to add Source as per shopping, booking, campaign, and web in Power BI DAX. For example, there are 3 shopping, 2 booking, 3 campaign and 2 web.
Source
Shopping_HVAL
Shopping_MVAL
Shopping_LVAL
Booking_HVAL
Booking_LVAL
Campaign_HVAL
Campaign_MVAL
Campaign_LVAL
Web_HVAL
Web_MVAL