Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to calculate percent & YTD percent using multiple slicers (filters)

Hello All,

 

https://drive.google.com/file/d/112XUWAetB2FCVNmum0qhLPaIuAD0tUFM/view?usp=sharing

 

kaumilgandhi_0-1621265735367.png

 

I want to Add "Apr %" & "Bkr %" rows to the above matrix visual based on calculation:-

 

Apr % = Apr # / App #

Bkr % = Bkr # / App #

 

Also, these 2 news rows are calcuated based on both the slicers.

 

Need your help.

 

Thank You

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

I was able to achieve by creating new measures.

View solution in original post

Anonymous
Not applicable

I was able to achieve the solution by creating new measures to display as row in matrix visual.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I was able to achieve by creating new measures.

v-kelly-msft
Community Support
Community Support

Hi  @Anonymous,

 

The link you share can not be accessed,could you pls modify it with an available one?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

@v-kelly-msft 

Here is the new updated link,

https://drive.google.com/file/d/1QcQefctJr36mB45uwi_98guZ8Vqc-GDb/view?usp=sharing

 

Also, here is the sql sample data:-

--CREATE TABLE dbo.vw ( app_dt date, borr_nm varchar(10), mt varchar(10), mtvalue smallint )

--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Fr', 'App #',  14 )
--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Fr', 'Apr #',  9 )
----INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Fr', 'Apr %',  64 )
--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Fr', 'Bkr #',  9 )
----INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Fr', 'Bkr %',  64 )

--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Nw', 'App #',  92 )
--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Nw', 'Apr #',  0 )
----INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Nw', 'Apr %',  0 )
--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Nw', 'Bkr #',  0 )
----INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Nw', 'Bkr %',  0 )

--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Pr', 'App #',  65 )
--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Pr', 'Apr #',  49 )
----INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Pr', 'Apr %',  75 )
--INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Pr', 'Bkr #',  50 )
----INSERT INTO dbo.vw VALUES ( '2020-11-01', 'Nw', 'Bkr %',  76 )


--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Fr', 'App #',  13 )
--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Fr', 'Apr #',  7 )
----INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Fr', 'Apr %',  53 )
--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Fr', 'Bkr #',  7 )
----INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Fr', 'Bkr %',  53 )

--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Nw', 'App #',  499 )
--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Nw', 'Apr #',  0 )
----INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Nw', 'Apr %',  0 )
--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Nw', 'Bkr #',  0 )
----INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Nw', 'Bkr %',  0 )

--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Pr', 'App #',  386 )
--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Pr', 'Apr #',  374 )
----INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Pr', 'Apr %',  96 )
--INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Pr', 'Bkr #',  379 )
----INSERT INTO dbo.vw VALUES ( '2020-12-01', 'Pr', 'Bkr %',  98 )

SELECT	*
FROM	dbo.vw

--DROP TABLE dbo.vw



How to display additional ROW of Apr% & Bkr%, the calculations are:-
Apr% = Apr# / App#
Bkr% = Bkr# / App#

Also, how to display YTD for these 2 additional rows as %?

Anonymous
Not applicable

I was able to achieve the solution by creating new measures to display as row in matrix visual.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.