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.
I have my dataset in below format. i want to see the BUY and SELL for China in one chart. can you please help?
Example: Jan month - China has export 200 and imports 300
Solved! Go to Solution.
Hi @Kannan4444 ,
Please try:
First create a table for slicer and turn the single select on:
For slicer = DISTINCT( UNION( SUMMARIZE('Table',[Load Country]),SUMMARIZE('Table',[Discharge Country])))
Output:
Then create the following measures:
Export = CALCULATE(SUM('Table'[Voulme]),FILTER('Table',[Load Country]=SELECTEDVALUE('For slicer'[Country])))
Imports = CALCULATE(SUM('Table'[Voulme]),FILTER('Table',[Discharge Country]=SELECTEDVALUE('For slicer'[Country])))
Apply them to the visual:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Kannan4444 ,
Please try:
First create a table for slicer and turn the single select on:
For slicer = DISTINCT( UNION( SUMMARIZE('Table',[Load Country]),SUMMARIZE('Table',[Discharge Country])))
Output:
Then create the following measures:
Export = CALCULATE(SUM('Table'[Voulme]),FILTER('Table',[Load Country]=SELECTEDVALUE('For slicer'[Country])))
Imports = CALCULATE(SUM('Table'[Voulme]),FILTER('Table',[Discharge Country]=SELECTEDVALUE('For slicer'[Country])))
Apply them to the visual:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Kannan4444 - Refer to this sample pbix file. Let me know if you have any questions.
1. In Power Query, transpose your data as below.
2. Create two measure as below
Did I answer your question? Mark my post as a solution! If not, please feel free to ask me.
Also, I would ❤ Kudos if my solution helped. It is a token of appreciation!
Thank you very much !
can you please share the Pbix file please
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.