Hi Team,
Looking for some DAX to achieve the following...
Data as follows:
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Shop
[/TH]
[TH]Type
[/TH]
[TH]Week
[/TH]
[TH]Amount
[/TH]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Bag
[/TD]
[TD]1
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Bag
[/TD]
[TD]2
[/TD]
[TD]15
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Bag
[/TD]
[TD]3
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Box
[/TD]
[TD]1
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Box
[/TD]
[TD]2
[/TD]
[TD]15
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Box
[/TD]
[TD]3
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Bag
[/TD]
[TD]1
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Bag
[/TD]
[TD]2
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Bag
[/TD]
[TD]3
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Bag
[/TD]
[TD]1
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Bag
[/TD]
[TD]2
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Bag
[/TD]
[TD]3
[/TD]
[TD]20
[/TD]
[/TR]
</tbody>[/TABLE]
Result as follows:
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Week
[/TH]
[TH]Amount
[/TH]
[/TR]
[TR]
[TD]1
[/TD]
[TD]35
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]45
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]42
[/TD]
[/TR]
</tbody>[/TABLE]
The result was achieved as follows:
Where more than one Type exists for a given Shop / Week combination, take the MAX Amount for that Shop / Week across ALL Types, otherwise just take the Amount. Finally, Sum the resulting values up for each Week.
I've had a play myself but can't quite get it, hence the ask.
Cheers,
Matty
Looking for some DAX to achieve the following...
Data as follows:
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Shop
[/TH]
[TH]Type
[/TH]
[TH]Week
[/TH]
[TH]Amount
[/TH]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Bag
[/TD]
[TD]1
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Bag
[/TD]
[TD]2
[/TD]
[TD]15
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Bag
[/TD]
[TD]3
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Box
[/TD]
[TD]1
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Box
[/TD]
[TD]2
[/TD]
[TD]15
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Box
[/TD]
[TD]3
[/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Bag
[/TD]
[TD]1
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Bag
[/TD]
[TD]2
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]Bag
[/TD]
[TD]3
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Bag
[/TD]
[TD]1
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Bag
[/TD]
[TD]2
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]Bag
[/TD]
[TD]3
[/TD]
[TD]20
[/TD]
[/TR]
</tbody>[/TABLE]
Result as follows:
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Week
[/TH]
[TH]Amount
[/TH]
[/TR]
[TR]
[TD]1
[/TD]
[TD]35
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]45
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]42
[/TD]
[/TR]
</tbody>[/TABLE]
The result was achieved as follows:
Where more than one Type exists for a given Shop / Week combination, take the MAX Amount for that Shop / Week across ALL Types, otherwise just take the Amount. Finally, Sum the resulting values up for each Week.
I've had a play myself but can't quite get it, hence the ask.
Cheers,
Matty