Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I have a problem with a table in a power BI report.
To begin with, I have 3 tables:
1) Date table
2) Time Zone table (i create this for the order of graph)
3) Main Table
The Main Table consists the information about the complaint ID (all unique value), the date of opening, the time zone (9-10, 10-11, etc.) opening, the date of closing, the time zone closing (9-10, 10-11, etc.) and others variables.
All i want to do is to plot in the same bar chart the opened (in) and closed (out) cases per time zone like the photo below:
Below you can see the data modeling:
1) Time Zone In (Active) with the Time Zone
2) Time Zone Out (InActive) with the Time Zone
3) Log_Date In (Active) with the Date Table
4) Log_Date Out (InActive) with the Date Table
Also, I created a measure:
My problem is that i want to see both which are the IDs In and the IDs Out when i click on the bar and not only the IDs In.
Thank in advance,
Hi @Anonymous ,
According to your description, I created some data to show:
Here are the steps you can follow:
1. Create measure.
In =
CALCULATE(COUNT('Main table'[the time zone open]),USERELATIONSHIP('Main table'[the time zone open],'Time Zone table'[Index]))
Out =
CALCULATE(COUNT('Main table'[ the time zone closin]),USERELATIONSHIP('Main table'[ the time zone closin],'Time Zone table'[Index]))
Flag =
VAR _out=CALCULATE(MAX('Main table'[complaint ID]),USERELATIONSHIP('Main table'[ the time zone closin],'Time Zone table'[Index]))
var _in=CALCULATE(MAX('Main table'[complaint ID]),USERELATIONSHIP('Main table'[the time zone open],'Time Zone table'[Index]))
RETURN if(not(ISBLANK(_in))||not(ISBLANK(_out)),1,0)
2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.