cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Frequent Visitor

## Regarding Matrix Column Total Calculation based on date selection

Hi,

I have to create a DAX which calculates the total of a column based on date and then divide the row total of that with the total value.

eg.

So, i want to create a measure which take amount total value based on date and calculate amount(%) by dividing individual row by total amount in the same way as shown in table.

Kindly suggest.

1 ACCEPTED SOLUTION
Frequent Visitor

Thank you Guys for the help..

I also tried using this :

Total = CALCULATE(Table[Amount],ALLEXCEPT(Table,Table[Date))

and it worked !!

Thanks for your help as well.

3 REPLIES 3
Frequent Visitor

Thank you Guys for the help..

I also tried using this :

Total = CALCULATE(Table[Amount],ALLEXCEPT(Table,Table[Date))

and it worked !!

Thanks for your help as well.

Community Champion

Hi @NiMa ,

You could create a measure as below:-

``````Measure =
VAR total =
CALCULATE (
SUM ( 'Table (2)'[Amount] ),
ALL ( 'Table (2)'[Variety] ),
'Table (2)'[Date] = MAX ( 'Table (2)'[Date] )
)
RETURN
DIVIDE ( MAX ( 'Table (2)'[Amount] ), total )
``````

Refer attached file.

BR,

Samarth

Best Regards,
Samarth

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

Anonymous
Not applicable

Hi

first measure , sales by day by variety==>

Total sales = sum(Fruit[Amount])

second measure , Total sales for the day==>
Total sales day = calculate(sum(Fruit[Amount]),REMOVEFILTERS(Fruit[Variety]))

Third measure, calculate %
%sales = divide(Fruit[Total sales],Fruit[Total sales day],0)

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors