Forum Discussion
Create two different fields from single table with one date
I need to use one table, with one Created Date and output two different fields from that. Basically, a user can choose one date timeframe and the output would be called "Branded". Then the user can choose another, different timeframe, from the same table and the output is called "UnBranded".
Should look like this
Where "Branded" is based off of one date selected and "UnBranded" is based off a different date selected. Both are using the same Created Date Field.
I did try this, but it doesnt separate them into one line for Branded and another for Unbranded. They would have to be next to each other to show which is better performing. It is meant to show Branded results, based off of a date range and then Unbranded results below it based on a different date range chosen.
//Date1 is independent Date table
Branded =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))
//Date1 is independent Date table
Not Branded =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] < _min && 'Table'[Date] > _max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
I alos tried to do an append and a merge, but got stuck. Attached a dataset that should be similar
1 Reply
- amitchandakSuper User
Kornholio1313 , If you need branded and unbranded as rows, You need create measures for
UnBranded records, UnBranded Engaged , UnBranded diff
Branded records, Branded Engaged , Branded diff
As suggested above and then use calculation group to create the desired output.
Remember, you need a column, but calculated column can not take slicer value, so you have to go measure way
Check the option, where I have split the Calculation group using a custom column
Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0