Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello Everyone,
I have crated a column using variables, but i have a problem set specific Start Time and End Time depending each Country.
Business Elapsed Hours (Created to Screening) = VAR BusHoursStart = TIME(09,45,00)
VAR BusHoursEnd = TIME(18,15,00).
I want BusHoursStart to be (09,45,00) if the values of column Country are (Greece or France), and BusHoursStart (11,45,00) if values are (UK or USA).
Not sure if I understood your problem statement correctly on how dynamic you want this to be , but as a generic -
1. Create two custom columns 1 for start time and 1 for end time
2. sample dax for start -
Business Hours Start =
var _bushourstart1 = Time(09,45,00)
var _bushourstart2 = Time(11,45,00)
Retrun
switch(
True(),
table[country] == "USA", _bushourstart2,
table[country] == "UK", _bushourstart2,
table[country] == "France", _bushourstart1,
table[country] == "Greece", _bushourstart2
)
3. do the same step for endtime
if you want dymamic then need to put these country and start and endtime in a master table or file then join with data table and need to change the dax field accordingly
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |