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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to use the output of a visual and calculate the result based on that output

I have 2 measures called A and B. I want to create 2 seperate visuals with this individual measure

Visual-1:  I want to see the value for measure A  with Date filter/slicer: 1st Aug 2019. 

Visual-2:  I want to see the value for measure B  with Date filter/slicer: 1st Sep 2019

 

Now, in  Visual-3, I want to add the output of Visual-1 and Visual-2 to get the total value

 

Note: In future, I will select any date  (dynamically) in slicer and I should get the correct result in Visual-3 based on Visual-1 and visual-2 value.

 

Thanks in advance !

1 ACCEPTED SOLUTION

hi, @Anonymous 

It's pleasant that your problem has been solved, Smiley Very Happy please accept the reply as solution,


@Anonymous wrote:

HI Lin/All, 

This one helps and I also got the solution from here: 

https://community.powerbi.com/t5/Desktop/How-to-use-the-output-of-1-visual-as-input-into-another-visual/m-p/798857#M384441 

 

Thanks all for your help.

 


that way, other community members will easily find the solution when they get same issue.

 

Best Regards,

Lin

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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Create onle one date slicer/filter from the Date Table.  Select any Year/month there (say Aug 2019).  Measure B should be

MeasureB.1 = CALCULATE([MeasureB],NEXTMONTH(Calendar[Date])

MeasureC  = [MeasureA]+[MeasureB.1]

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Same date column I want to use as slicer with different value for both Measure A and measure B at any given time. Then, measure-C should calculate the result based on the output of A and B.

 

Means, visual-1 has Measure/column A ----> with Date slicer -- Let's take Aug 2019/or any value --user can select any value from date.

 

and Visual-2 has Measure/Column B -----> with Date Slicer --  Let's take different value than A--- user can select any value from date slicer.

Visual 3 will simply add the output for visual-1 and Visual-2.

 

 

I am stuck at visual-3. Not able to add the output of Visual-1 and visual-2. Please find the below screenshot for reference.

Please note, user can select any value from Date slicer

.Capture.PNG

hi, @Anonymous 

From your screenshot, I think you had set the "Edit interactions" to make the same date field to filter different visual. So it will (most) probably be infeasible to get visual 3 in current workaround.

But you could refer to this blog and try this way to get your requirement 

Filtering and comparing different time periods with Power BI

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

HI Lin/All, 

This one helps and I also got the solution from here: 

https://community.powerbi.com/t5/Desktop/How-to-use-the-output-of-1-visual-as-input-into-another-vis... 

 

Thanks all for your help.

 

hi, @Anonymous 

It's pleasant that your problem has been solved, Smiley Very Happy please accept the reply as solution,


@Anonymous wrote:

HI Lin/All, 

This one helps and I also got the solution from here: 

https://community.powerbi.com/t5/Desktop/How-to-use-the-output-of-1-visual-as-input-into-another-visual/m-p/798857#M384441 

 

Thanks all for your help.

 


that way, other community members will easily find the solution when they get same issue.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AnkitBI
Solution Sage
Solution Sage

Hi - For your requirement.

1) Create a new measure and use SelectedValue to identify the date and Switch to select the measure based on date. You can use the measure in both the visuals (Several Ref available).

2) For 2nd, use can create a new Measure and use C = [A] + [B]

 

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

Anonymous
Not applicable

Hi Ankit, 

 

I have added more details here. Please share Dax script if possible.

 

Same date column I want to use as slicer with different value for both Measure A and measure B at any given time. Then, measure-C should calculate the result based on the output of A and B.

 

Means, visual-1 has Measure/column A ----> with Date slicer -- Let's take Aug 2019/or any value --user can select any value from date.

 

and Visual-2 has Measure/Column B -----> with Date Slicer --  Let's take different value than A--- user can select any value from date slicer.

Visual 3 will simply add the output for visual-1 and Visual-2.

 

 

I am stuck at visual-3. Not able to add the output of Visual-1 and visual-2. Please find the below screenshot for reference.

Please note, user can select any value from Date slicer

kentyler
Solution Sage
Solution Sage

What is the relationship between the date you will select and the dates for the 2 visuals ? previous months ?

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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