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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
TracyTran
Helper I
Helper I

Who sold all stocks? sold partially?

Hi friends, 

 

I have the fact table "F_transaction" updated daily which records “buy”, “sell” transaction of investors. The investors can sell all their stocks or partially.

The example dataset is here LINK.  I would like to answer those questions:

 

  1. How many investors sold all of their stocks today? who are they?, and what is the total dollar amount of those complete sold?
  2. How many investors sold only a portion of their stocks today? who are they? and what is the total dollar amount of those partial sold?

My desired result: 

TracyTran_0-1694058839942.png

 

Much appreciated your help and time. 

1 REPLY 1
lbendlin
Super User
Super User

Thank you for providing sample data.  It seems to be missing the base value?  I would also think you should fold Buy and Sell into a single column  (assuming Buy is always positive and Sell is always negative?).

 

lbendlin_0-1694302524777.png

lbendlin_1-1694302646534.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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