March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Team,
I have this table (Col A and Col B) and I need Output like this in Col F, G, H.
Please help me with Power BI.
Solved! Go to Solution.
Hi @bhavinshah
You can use 2 measures for the new columns. check the output first and then try the DAX code for measures.
TBL7 is my table name.
First measure the count all the values (Y and N both)
TBL7 Total Count = COUNTROWS(TBL7)
After that filter out the Y rows and then count the rows.
TBL7 Count Y =
VAR ValuesY =
FILTER(
TBL7,
TBL7[Status] = "Y"
)
VAR ValuesCount =
COUNTROWS(ValuesY)
RETURN
ValuesCount+0
Dear @bhavinshah ,
Please find below a possible solution.
This measure is for the Group measure.
This is for the Count measure.
Dear @bhavinshah ,
Please find below a possible solution.
This measure is for the Group measure.
This is for the Count measure.
Hi @bhavinshah
You can use 2 measures for the new columns. check the output first and then try the DAX code for measures.
TBL7 is my table name.
First measure the count all the values (Y and N both)
TBL7 Total Count = COUNTROWS(TBL7)
After that filter out the Y rows and then count the rows.
TBL7 Count Y =
VAR ValuesY =
FILTER(
TBL7,
TBL7[Status] = "Y"
)
VAR ValuesCount =
COUNTROWS(ValuesY)
RETURN
ValuesCount+0
The first measure has grouped all the data irrespective of the status (Y,N)
and then it applied a check to count only the Y status and ignore the N.
You can add another measure as well to count the N values for each text, and then minus it from the total count and it will give you the same results.
Hello @Musadev
This works -
TBL7 Total Count = COUNTROWS(TBL7)
Original
Now how can I apply Y then Count should be there Else 0 - How CAn I apply
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |