The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi!
I am looking to "count" how many customer's are considered to have "Increasing" sales and how many are considered to be "Decreasing". I would like to add the result to a Card visualization.
Here is my measure:
I'm confused on how to combine "count" with a measure (or if I need to go about finding the answer in a different way).
Thanks for the help!
Solved! Go to Solution.
NewMeasure=VAR _tbl=ADDCOLUMNS(VALUES(TableName[CustomerID]),"@Status",[Increasing or Decreasing]) RETURN COUNTROWS(FILTER(_tbl,[@Status]="Increasing")) & " Customers Increasing and "&COUNTROWS(FILTER(_tbl,[@Status]="Decreasing"))&" Customers Decreasing"
NewMeasure=VAR _tbl=ADDCOLUMNS(VALUES(TableName[CustomerID]),"@Status",[Increasing or Decreasing]) RETURN COUNTROWS(FILTER(_tbl,[@Status]="Increasing")) & " Customers Increasing and "&COUNTROWS(FILTER(_tbl,[@Status]="Decreasing"))&" Customers Decreasing"
Hello @Anonymous
Please try
Calculate(countx(table,[the measure]),[the measure] = "Decreasing")
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |