Forum Discussion

dhanurjaya's avatar
dhanurjaya
Frequent Visitor
1 year ago
Solved

creating dynamic measure

Hello everyone,

 

please help how to create dynamic measure for below in power BI and power pivot data model in excel.

 

sample Data is below:

Parent CustomerCustomer Sales GroupMonthValue
1001353Sep-23 
100135Q20Sep-230.896675
1006103Sep-230.15066
1331073Sep-237.1619036
133107Q20Sep-231.2666331
1350683Sep-230.56102
1362893Sep-23 
1362894Sep-230.36019
136289D34Sep-230.1833
136289P21Sep-231.22
1902063Sep-230.41964
2018103Sep-234.244085
201810Q20Sep-231
2021512Sep-230.0714
2025182Sep-230.8357227
202518Q20Sep-234.6553551
2092912Sep-230.13626
1001353Sep-241.2
100135Q20Sep-240.896675
1006103Sep-240.15066
1331073Sep-247.1619036
133107Q20Sep-241.2666331
1350683Sep-240.56102
1362893Sep-241
1362894Sep-240.36019
136289D34Sep-240.1833
136289P21Sep-241.22
1902063Sep-240.41964
2018103Sep-244.244085
201810Q20Sep-241
2021512Sep-240.0714
2025182Sep-24 
202518Q20Sep-244.6553551
2092912Sep-240.13626

 

Output Result 1 below:

 

Parent CustomerCustomer Sales GroupSep-23Sep-24Grand Total
10013530.8970.8971.793
100135Q200.8970.8971.793
10061030.1510.1510.301
13310738.4298.42916.857
133107Q200.5610.5611.122
13506830.0001.0001.000
13628930.7931.7932.587
13628941.1531.1532.307
136289D340.1830.1830.367
136289P211.2201.2202.440
19020630.4200.4200.839
20181035.2445.24410.488
201810Q201.0001.0002.000
20215120.0710.0710.143
20251825.4914.65510.146
202518Q204.6554.6559.311
20929120.1360.1360.273
Grand Total 31.30132.46663.767

 

output Result 2 below:

Customer Sales GroupSep-23Sep-24Grand Total
25.6994.86310.562
315.93317.93333.866
41.1531.1532.307
D340.1830.1830.367
P211.2201.2202.440
Q207.1137.11314.226
Grand Total31.30132.46663.767

 

please help how to create this.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, dhanurjaya 

     

    Please check if this is the result you expect?

    Sep-23 = CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Parent Customer]),[Month].[Year]=2023))
    Sep-24 = CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Parent Customer]),[Month].[Year]=2024))

    Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, dhanurjaya 

     

    Please check if this is the result you expect?

    Sep-23 = CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Parent Customer]),[Month].[Year]=2023))
    Sep-24 = CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Parent Customer]),[Month].[Year]=2024))

    Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.