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

visualizing two column with same contents

Hi all,

 

I have data set in CSV which had two columns for the source of events.  There are 8 options available for sources, and 2 can be picked and stored in CSV columns. How can I show these 8 options in power bi with % of total quantity?

idDateaddressstore_idemployee_idcatsubcatsub-subcatsizesource1sourceqtytype of creditnote
125736/11/2020gdgdfgdf2355ujrth56432143routwearcoatlio-3514loiloi6fix 
125736/11/2020gdgdfgdf2355ujrth56432143rbottomskirtreview10kimvto16loan 
125736/11/2020gdgdfgdf2355rhytrhtrhrkidsschoolhat4jetylp2credit 
125736/11/2020gdgdfgdf2355grehytraccesorybagbackpack-ylploi1high 
125736/11/2020gdgdfgdf2355ujrth56432143raccesorywatchsmartwdollykim1fix 
125736/11/2020bdfgjjg3358egrhtr900toydollbellassmojet2loan 
125739/11/2020bdfgjjg3358dfrhrdhoutwearraincoartlong12jetylp4credit 
125739/11/2020bdfgjjg3358egrhtr900kidsskirtbelt8ylpdolly4high 
125739/11/2020bdfgjjg3358grhrh23332toyxbox3-loismo1fix 
125739/11/2020cvbffdbfgb58744yrttyytik89accesoryhair dryer200w-vtojet9loan 
125739/11/2020bsfdbgff2358retert9885bottompantskinny6dollyylp4credit 
125739/11/2020streyhrt4587ryrurtj3255topshirtvneck8comeloi10high 
125739/11/2020streyhrt4587ryyhrtrtj3256topblouseribbon8kimvto8fix 
125739/11/2020streyhrt4587ryyhrtrtj3256kidsdressdisney6jetdolly6loan 
125739/11/2020reryrtrt2358hrthjt225588accesoryhair tiebow-ylpcome1credit 
125739/11/2020 ghhtrjrtj3687hdfhnfg9863toptshirtwhite10dollyvto40high 
1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a new table contains all source.

Table 2 = DISTINCT(UNION(SELECTCOLUMNS('Table',"source",'Table'[source]),SELECTCOLUMNS('Table',"source",'Table'[source1])))

3.PNG 

Then create a measure.

Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[source]=SELECTEDVALUE('Table 2'[source])||'Table'[source1]=SELECTEDVALUE('Table 2'[source])))/COUNTROWS('Table')

Result would be shown as below.

4.PNG

 

Best Regards,

Jay

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

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a new table contains all source.

Table 2 = DISTINCT(UNION(SELECTCOLUMNS('Table',"source",'Table'[source]),SELECTCOLUMNS('Table',"source",'Table'[source1])))

3.PNG 

Then create a measure.

Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[source]=SELECTEDVALUE('Table 2'[source])||'Table'[source1]=SELECTEDVALUE('Table 2'[source])))/COUNTROWS('Table')

Result would be shown as below.

4.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@Anonymous , Create a source dimension distinct from these two (https://www.youtube.com/watch?v=Bkf35Roman8)

 

Join with both sources, One join will inactive. Create a measure to activate that join and use userelationship

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

https://www.youtube.com/watch?v=e6Y-l_JtCq4

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.