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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Simple_one
Helper I
Helper I

Need help on Dax

Hello everyone,

I have a problem in this visual of Power BI below :

 

Simple_one_2-1721806014891.png

 

 

I chosen 3 Months in Slicer : 01-2023, 02-2023, 03-2023 but the visual present all of the months have number of Reenrol

Besides, the result of Number of ReEnrol is not correct ( the correct number is 777)

I think my dax for calculating of # of Reenrol is wrong . Please help me to make this matrix can present like:

When I chosen the months in Slicer, just present the correct : # of Offtrack and # of Reenrol

 

I have a power BI in this link : https://drive.google.com/file/d/1wTIRIYZwen1DQZa0caWyGjAnjINpNoQ7/view?usp=drive_link 

Please help me for this dax! Thank you very much

 

 

 

 

1 ACCEPTED SOLUTION

@Simple_one You can create a calculated column:

CHECK_DATE = IF('Offtrack Reenrollment'[OFFTRACK_YM] = 'Offtrack Reenrollment'[YEAR_MONTH], 1, 0)then put this column in filter pane of the matrix visual and select "equals 1":
BeaBF_0-1721814885774.png

 

it will show you only the desidered dates:

BeaBF_1-1721814916844.png

 

 

BBF

View solution in original post

9 REPLIES 9
Dyuti_M9
New Member

Hi I want to calculate the difference in sales volume per interval of minute as given in the table below however I am getting the wrong result. Can you please help?

Dyuti_M9_0-1723721380258.png

 

 

Dyuti_M9
New Member

Hi I want to calculate the difference in sales volume per interval of minute as given in the table below however I am getting the wrong result. Can you please help?

Dyuti_M9_0-1723721270783.png

 

BeaBF
Super User
Super User

@Simple_one Hi! I'm on your pbix file, why is that number wrong? If I put values in a table, the total is correct. Which is the calculation that should do the measure? and the expected output for row?

BeaBF_0-1721806489696.png

 

BBF

Hi @BeaBF ,

The # of Reenrol of 03-2023 is : 156 ( with my dax for calculate # of Reenrol ).

My dax for calculating of # of Reenrol is not correct. Can you help me for fixing this ?

@Simple_one ok, but which is the logic to obtain 156 for 03-2023?

Hi @BeaBF ,

I count Distinct number of USERINFORMATION_KEY in data for OFFTRACK_YM of 03-2023  = 156. Because student can reenrolment many time but we count this student one time

@Simple_one Try with:

# of Reenrol = CALCULATE(
SUMX(DISTINCT(SELECTCOLUMNS('Offtrack Reenrollment'
    ,"ID",'Offtrack Reenrollment'[USERINFORMATION_KEY]
    ,"isReenrollment",'Offtrack Reenrollment'[ISREENROLL])),[isReenrollment]), 'Offtrack Reenrollment'[OFFTRACK_YM] in VALUES('Offtrack Reenrollment'[YEAR_MONTH]))
 
BeaBF_0-1721810921506.png

 

if it's ok, please accept my answer as solution.

 

BBF

Hi @BeaBF 

It correct , but the matrix is present the Month that I am not select in the Slicer (as 2023-10, 2023-11, ....)? Can you help me fix this ?

Simple_one_1-1721812260039.png

 

@Simple_one You can create a calculated column:

CHECK_DATE = IF('Offtrack Reenrollment'[OFFTRACK_YM] = 'Offtrack Reenrollment'[YEAR_MONTH], 1, 0)then put this column in filter pane of the matrix visual and select "equals 1":
BeaBF_0-1721814885774.png

 

it will show you only the desidered dates:

BeaBF_1-1721814916844.png

 

 

BBF

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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