cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
juliausha
Helper I
Helper I

Combine two graphs with different values but similar content

How can I combine 2 graphs into one when the values have different meaning (one is # App Views, another one is # Purchases) but on a surface have  similar values: '0, 1, 2, 3, 4, 5, etc."

 

At the momnent I have these 2 graphs: 

juliausha_0-1637936854289.png

 

Here you can find the actual .pbix file: https://www.dropbox.com/s/yhua9xszvcmj2df/My%20test1.pbix?dl=0 

 

I need to combine them into one: 

juliausha_1-1637937061585.png

Thanks in advance for your answer! 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @juliausha ,

My idea is to create two separate calculation tables, convert measure into columns in the tables, and finally present the results in a summary table:

Sheet2:

custom table:
sheet2 = VALUES(Sheet1)
measure:
sheet2AppVisits = CALCULATE(
	DISTINCTCOUNT(Sheet2[User]),
	FILTER(
		ALLSELECTED(Sheet2),
		ISONORAFTER(Sheet2[App Visits], MIN(Sheet2[App Visits]), ASC)
	)
)
new colmn:
Column = sheet2[sheet2AppVisits]

vluwangmsft_0-1638340991008.png

 

Sheet3:

sheet3 = VALUES(Sheet1)
measure:
sheet3purchases = 
CALCULATE(
	DISTINCTCOUNT(Sheet3[User]),
	FILTER(
		ALLSELECTED(Sheet3),
		ISONORAFTER(Sheet3[Purchases], MIN(Sheet3[Purchases]), ASC)
	)
)
column:
Column = sheet3[sheet3purchases]

 

vluwangmsft_1-1638341003780.png

 

Final table:

sheetrelation = DISTINCT(UNION(DISTINCT(Sheet1[App Visits]),DISTINCT(Sheet1[Purchases])))

ColumnA = IF(LOOKUPVALUE(sheet2[Column],sheet2[App Visits],sheetrelation[App Visits])=BLANK(),0,LOOKUPVALUE(sheet2[Column],sheet2[App Visits],sheetrelation[App Visits]))

ColumnB = IF(LOOKUPVALUE(sheet3[Column],sheet3[Purchases],sheetrelation[App Visits])=BLANK(),0,LOOKUPVALUE(sheet3[Column],sheet3[Purchases],sheetrelation[App Visits]))

vluwangmsft_2-1638341028088.png

Output:

vluwangmsft_3-1638341060927.png

 

 

 

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


Best Regards

Lucien

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @juliausha ,

My idea is to create two separate calculation tables, convert measure into columns in the tables, and finally present the results in a summary table:

Sheet2:

custom table:
sheet2 = VALUES(Sheet1)
measure:
sheet2AppVisits = CALCULATE(
	DISTINCTCOUNT(Sheet2[User]),
	FILTER(
		ALLSELECTED(Sheet2),
		ISONORAFTER(Sheet2[App Visits], MIN(Sheet2[App Visits]), ASC)
	)
)
new colmn:
Column = sheet2[sheet2AppVisits]

vluwangmsft_0-1638340991008.png

 

Sheet3:

sheet3 = VALUES(Sheet1)
measure:
sheet3purchases = 
CALCULATE(
	DISTINCTCOUNT(Sheet3[User]),
	FILTER(
		ALLSELECTED(Sheet3),
		ISONORAFTER(Sheet3[Purchases], MIN(Sheet3[Purchases]), ASC)
	)
)
column:
Column = sheet3[sheet3purchases]

 

vluwangmsft_1-1638341003780.png

 

Final table:

sheetrelation = DISTINCT(UNION(DISTINCT(Sheet1[App Visits]),DISTINCT(Sheet1[Purchases])))

ColumnA = IF(LOOKUPVALUE(sheet2[Column],sheet2[App Visits],sheetrelation[App Visits])=BLANK(),0,LOOKUPVALUE(sheet2[Column],sheet2[App Visits],sheetrelation[App Visits]))

ColumnB = IF(LOOKUPVALUE(sheet3[Column],sheet3[Purchases],sheetrelation[App Visits])=BLANK(),0,LOOKUPVALUE(sheet3[Column],sheet3[Purchases],sheetrelation[App Visits]))

vluwangmsft_2-1638341028088.png

Output:

vluwangmsft_3-1638341060927.png

 

 

 

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


Best Regards

Lucien

View solution in original post

Hi @v-luwang-msft thank you very much for your solution! It's impressive how you managed to solve it. It works like charm 🙂 

amitchandak
Super User
Super User

@juliausha , Assume these are column values.

You can generate a series as table

Seq = generateseries(1,200,1)

 

Join both these with value column of this table and use value in x-axis of visual

 

If both columns are from one table one join will be inactive. activate that using userelationship in a measure

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Thank you for your reply @amitchandak . I tried to follow your advise and activate a relationship by creating a new measure "USERRELATIONSHIP". Please see the .pbix file  https://www.dropbox.com/s/mur7p516zm8hzo9/My%20test2.pbix?dl=0

 

It looks like that I did something wrong because one of my joins dosn't work properly: 

juliausha_0-1638193779172.png

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors